Peter Surda
59f3a2fbe7
- rearranged code to reduce cyclic dependencies - doCleanShutdown is separated in shutdown.py - shared queues are separated in queues.py - some default values were moved to defaults.py - knownnodes partially moved to knownnodes.py
17 lines
603 B
Python
17 lines
603 B
Python
from helper_sql import *
|
|
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))
|
|
|
|
def trash(msgid):
|
|
sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid)
|
|
queues.UISignalQueue.put(('removeInboxRowByMsgid',msgid))
|
|
|
|
def isMessageAlreadyInInbox(sigHash):
|
|
queryReturn = sqlQuery(
|
|
'''SELECT COUNT(*) FROM inbox WHERE sighash=?''', sigHash)
|
|
return queryReturn[0][0] != 0
|