Removed helper_inbox

This commit is contained in:
Dmitri Bogomolov 2019-09-27 14:58:12 +03:00
parent 1364116304
commit d4180b7ead
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 0 additions and 25 deletions

View File

@ -1,25 +0,0 @@
"""Helper Inbox performs inbox messages related operations"""
import queues
from helper_sql import sqlExecute, sqlQuery
def insert(t):
"""Perform an insert into the "inbox" table"""
sqlExecute('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?,?)''', *t)
# shouldn't emit changedInboxUnread and displayNewInboxMessage
# at the same time
# queues.UISignalQueue.put(('changedInboxUnread', None))
def trash(msgid):
"""Mark a message in the `inbox` as `trash`"""
sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid)
queues.UISignalQueue.put(('removeInboxRowByMsgid', msgid))
def isMessageAlreadyInInbox(sigHash):
"""Check for previous instances of this message"""
queryReturn = sqlQuery(
'''SELECT COUNT(*) FROM inbox WHERE sighash=?''', sigHash)
return queryReturn[0][0] != 0