Merge branch 'UiChanges' of https://github.com/cis-navjot-g/PyBitmessage into codequalitykivy

This commit is contained in:
lakshyacis 2019-08-17 10:56:27 +05:30
commit ca0b15e208
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
3 changed files with 9 additions and 9 deletions

View File

@ -1556,14 +1556,14 @@ class Draft(Screen):
def delete_draft(self, data_index, instance, *args): def delete_draft(self, data_index, instance, *args):
"""Method used to delete draft message permanently.""" """Method used to delete draft message permanently."""
sqlExecute( # sqlExecute(
"UPDATE sent SET folder = 'draft, trash' WHERE lastactiontime = {};".format( # "UPDATE sent SET folder = 'draft, trash' WHERE lastactiontime = {};".format(
data_index)) # data_index))
# sqlExecute( # sqlExecute(
# "UPDATE sent SET folder = 'trash' WHERE lastactiontime = {};".format( # "UPDATE sent SET folder = 'trash' WHERE lastactiontime = {};".format(
# data_index)) # data_index))
# sqlExecute("DELETE FROM sent WHERE lastactiontime = '{}';".format( sqlExecute("DELETE FROM sent WHERE lastactiontime = '{}';".format(
# data_index)) data_index))
try: try:
msg_count_objs = \ msg_count_objs = \
self.parent.parent.parent.parent.children[2].children[0].ids self.parent.parent.parent.parent.children[2].children[0].ids

View File

@ -96,7 +96,7 @@ class singleCleaner(threading.Thread, StoppableThread):
queryreturn = sqlQuery( queryreturn = sqlQuery(
"SELECT toaddress, ackdata, status FROM sent" "SELECT toaddress, ackdata, status FROM sent"
" WHERE ((status='awaitingpubkey' OR status='msgsent')" " WHERE ((status='awaitingpubkey' OR status='msgsent')"
" AND folder='sent' AND sleeptill<? AND senttime>?)", " AND folder LIKE '%sent%' AND sleeptill<? AND senttime>?)",
int(time.time()), int(time.time()) - int(time.time()), int(time.time()) -
shared.maximumLengthOfTimeToBotherResendingMessages shared.maximumLengthOfTimeToBotherResendingMessages
) )

View File

@ -73,7 +73,7 @@ class singleWorker(threading.Thread, StoppableThread):
# Initialize the neededPubkeys dictionary. # Initialize the neededPubkeys dictionary.
queryreturn = sqlQuery( queryreturn = sqlQuery(
'''SELECT DISTINCT toaddress FROM sent''' '''SELECT DISTINCT toaddress FROM sent'''
''' WHERE (status='awaitingpubkey' AND folder='sent')''') ''' WHERE (status='awaitingpubkey' AND folder LIKE '%sent%')''')
for row in queryreturn: for row in queryreturn:
toAddress, = row toAddress, = row
# toStatus # toStatus
@ -516,7 +516,7 @@ class singleWorker(threading.Thread, StoppableThread):
queryreturn = sqlQuery( queryreturn = sqlQuery(
'''SELECT fromaddress, subject, message, ''' '''SELECT fromaddress, subject, message, '''
''' ackdata, ttl, encodingtype FROM sent ''' ''' ackdata, ttl, encodingtype FROM sent '''
''' WHERE status=? and folder='sent' ''', 'broadcastqueued') ''' WHERE status=? and folder LIKE '%sent%' ''', 'broadcastqueued')
for row in queryreturn: for row in queryreturn:
fromaddress, subject, body, ackdata, TTL, encoding = row fromaddress, subject, body, ackdata, TTL, encoding = row
@ -686,7 +686,7 @@ class singleWorker(threading.Thread, StoppableThread):
'''SELECT toaddress, fromaddress, subject, message, ''' '''SELECT toaddress, fromaddress, subject, message, '''
''' ackdata, status, ttl, retrynumber, encodingtype FROM ''' ''' ackdata, status, ttl, retrynumber, encodingtype FROM '''
''' sent WHERE (status='msgqueued' or status='forcepow') ''' ''' sent WHERE (status='msgqueued' or status='forcepow') '''
''' and folder='sent' ''') ''' and folder LIKE '%sent%' ''')
# while we have a msg that needs some work # while we have a msg that needs some work
for row in queryreturn: for row in queryreturn:
toaddress, fromaddress, subject, message, \ toaddress, fromaddress, subject, message, \