From 9ee31684f606640fb770112f2b369674101edea2 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sat, 13 Apr 2019 17:18:38 -0500 Subject: [PATCH] fixed default expiration not using sum of date and made mail ui show inbox after closing message draft dialog --- onionr/onionrutils.py | 3 ++- onionr/static-data/www/mail/mail.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/onionr/onionrutils.py b/onionr/onionrutils.py index ea56b593..fa75f72a 100755 --- a/onionr/onionrutils.py +++ b/onionr/onionrutils.py @@ -157,6 +157,7 @@ class OnionrUtils: ''' Read metadata from a block and cache it to the block database ''' + curTime = self.getRoundedEpoch(roundS=60) myBlock = Block(blockHash, self._core) if myBlock.isEncrypted: myBlock.decrypt() @@ -179,7 +180,7 @@ class OnionrUtils: expireTime = myBlock.getHeader('expire') assert len(str(int(expireTime))) < 20 # test that expire time is an integer of sane length (for epoch) except (AssertionError, ValueError, TypeError) as e: - expireTime = onionrvalues.OnionrValues().default_expire + expireTime = onionrvalues.OnionrValues().default_expire + curTime finally: self._core.updateBlockInfo(blockHash, 'expire', expireTime) if not blockType is None: diff --git a/onionr/static-data/www/mail/mail.js b/onionr/static-data/www/mail/mail.js index 09b8714a..06cb080a 100644 --- a/onionr/static-data/www/mail/mail.js +++ b/onionr/static-data/www/mail/mail.js @@ -89,6 +89,7 @@ function setActiveTab(tabName){ break case 'send message': overlay('sendMessage') + setActiveTab('inbox') break } }