From f71f895a1121b54a2f9cc9a21d876a111255dd85 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Sat, 7 Apr 2018 16:11:24 +0530 Subject: [PATCH] helper_inbox formating --- src/helper_inbox.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/helper_inbox.py b/src/helper_inbox.py index 3506150a..95214743 100644 --- a/src/helper_inbox.py +++ b/src/helper_inbox.py @@ -1,15 +1,21 @@ -from helper_sql import * +"""Helper Inbox performs inbox messagese related operations.""" + +from helper_sql import sqlExecute, sqlQuery import queues + def insert(t): sqlExecute('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?,?)''', *t) - #shouldn't emit changedInboxUnread and displayNewInboxMessage at the same time - #queues.UISignalQueue.put(('changedInboxUnread', None)) - + # shouldn't emit changedInboxUnread and displayNewInboxMessage + # at the same time + # queues.UISignalQueue.put(('changedInboxUnread', None)) + + def trash(msgid): sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid) - queues.UISignalQueue.put(('removeInboxRowByMsgid',msgid)) - + queues.UISignalQueue.put(('removeInboxRowByMsgid', msgid)) + + def isMessageAlreadyInInbox(sigHash): queryReturn = sqlQuery( '''SELECT COUNT(*) FROM inbox WHERE sighash=?''', sigHash)