From 9fc658dbc911698823efd8bed3ceb2e3efae2b8c Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Tue, 17 May 2022 20:25:11 +0530 Subject: [PATCH] Fixed draft count number on badge --- src/bitmessagekivy/mpybit.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 1a435689..bb893c59 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -60,10 +60,7 @@ from bitmessagekivy.baseclass.common import toast from qr_scanner.zbarcam import ZBarCam from pyzbar.pyzbar import ZBarSymbol - -# import pdb; pdb.set_trace() from bitmessagekivy.kivy_state import KivyStateVariables - if platform != "android": from kivy.config import Config Config.set("input", "mouse", "mouse, multitouch_on_demand") @@ -683,15 +680,15 @@ class NavigateApp(MDApp): " where fromaddress = '{0}' and folder = 'trash' )" "+(SELECT count(*) FROM inbox where toaddress = '{0}' and" " folder = 'trash') AS SumCount".format(state.association))[0][0]) - state.draft_count = str(sqlQuery( + self.kivy_state_obj.draft_count = str(sqlQuery( "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and" - " folder = 'draft' ;".format(state.association))[0][0]) + " folder = 'draft' ;".format(self.kivy_state_obj.association))[0][0]) state.all_count = str(int(state.sent_count) + int(state.inbox_count)) if msg_counter_objs: msg_counter_objs.send_cnt.badge_text = state.sent_count msg_counter_objs.inbox_cnt.badge_text = state.inbox_count msg_counter_objs.trash_cnt.badge_text = state.trash_count - msg_counter_objs.draft_cnt.badge_text = state.draft_count + msg_counter_objs.draft_cnt.badge_text = self.kivy_state_obj.draft_count msg_counter_objs.allmail_cnt.badge_text = state.all_count def on_start(self):