fixed default expiration not using sum of date and made mail ui show inbox after closing message draft dialog

This commit is contained in:
Kevin Froman 2019-04-13 17:18:38 -05:00
parent 96219c81ab
commit 9ee31684f6
2 changed files with 3 additions and 1 deletions

View File

@ -157,6 +157,7 @@ class OnionrUtils:
''' '''
Read metadata from a block and cache it to the block database Read metadata from a block and cache it to the block database
''' '''
curTime = self.getRoundedEpoch(roundS=60)
myBlock = Block(blockHash, self._core) myBlock = Block(blockHash, self._core)
if myBlock.isEncrypted: if myBlock.isEncrypted:
myBlock.decrypt() myBlock.decrypt()
@ -179,7 +180,7 @@ class OnionrUtils:
expireTime = myBlock.getHeader('expire') expireTime = myBlock.getHeader('expire')
assert len(str(int(expireTime))) < 20 # test that expire time is an integer of sane length (for epoch) assert len(str(int(expireTime))) < 20 # test that expire time is an integer of sane length (for epoch)
except (AssertionError, ValueError, TypeError) as e: except (AssertionError, ValueError, TypeError) as e:
expireTime = onionrvalues.OnionrValues().default_expire expireTime = onionrvalues.OnionrValues().default_expire + curTime
finally: finally:
self._core.updateBlockInfo(blockHash, 'expire', expireTime) self._core.updateBlockInfo(blockHash, 'expire', expireTime)
if not blockType is None: if not blockType is None:

View File

@ -89,6 +89,7 @@ function setActiveTab(tabName){
break break
case 'send message': case 'send message':
overlay('sendMessage') overlay('sendMessage')
setActiveTab('inbox')
break break
} }
} }