Fixed draft count on badge
This commit is contained in:
parent
78ef49cd8e
commit
ed5d033912
|
@ -480,7 +480,7 @@ class NavigateApp(MDApp):
|
||||||
elif self.root.ids.scr_mngr.current == "mailDetail":
|
elif self.root.ids.scr_mngr.current == "mailDetail":
|
||||||
self.root.ids.scr_mngr.current = 'sent'\
|
self.root.ids.scr_mngr.current = 'sent'\
|
||||||
if state.detailPageType == 'sent' else 'inbox' \
|
if state.detailPageType == 'sent' else 'inbox' \
|
||||||
if state.detailPageType == 'inbox' else 'draft'
|
if self.kivy_state_obj.detailPageType == 'inbox' else 'draft'
|
||||||
self.back_press()
|
self.back_press()
|
||||||
if state.in_search_mode and self.kivy_state_obj.searcing_text:
|
if state.in_search_mode and self.kivy_state_obj.searcing_text:
|
||||||
toolbar_obj = self.root.ids.toolbar
|
toolbar_obj = self.root.ids.toolbar
|
||||||
|
@ -563,7 +563,7 @@ class NavigateApp(MDApp):
|
||||||
composer_objs = self.root
|
composer_objs = self.root
|
||||||
from_addr = str(self.root.ids.sc3.children[1].ids.ti.text)
|
from_addr = str(self.root.ids.sc3.children[1].ids.ti.text)
|
||||||
# to_addr = str(self.root.ids.sc3.children[1].ids.txt_input.text)
|
# to_addr = str(self.root.ids.sc3.children[1].ids.txt_input.text)
|
||||||
if from_addr and state.detailPageType != 'draft' \
|
if from_addr and self.kivy_state_obj.detailPageType != 'draft' \
|
||||||
and not state.in_sent_method:
|
and not state.in_sent_method:
|
||||||
Draft().draft_msg(composer_objs)
|
Draft().draft_msg(composer_objs)
|
||||||
return
|
return
|
||||||
|
@ -648,7 +648,7 @@ class NavigateApp(MDApp):
|
||||||
self.root.ids.scr_mngr.transition = SlideTransition()
|
self.root.ids.scr_mngr.transition = SlideTransition()
|
||||||
self.root.ids.scr_mngr.transition.direction = 'right'
|
self.root.ids.scr_mngr.transition.direction = 'right'
|
||||||
self.root.ids.scr_mngr.transition.bind(on_complete=self.reset)
|
self.root.ids.scr_mngr.transition.bind(on_complete=self.reset)
|
||||||
if state.is_allmail or state.detailPageType == 'draft':
|
if state.is_allmail or self.kivy_state_obj.detailPageType == 'draft':
|
||||||
state.is_allmail = False
|
state.is_allmail = False
|
||||||
state.detailPageType = ''
|
state.detailPageType = ''
|
||||||
state.in_composer = False
|
state.in_composer = False
|
||||||
|
@ -685,7 +685,7 @@ class NavigateApp(MDApp):
|
||||||
" folder = 'trash') AS SumCount".format(state.association))[0][0])
|
" folder = 'trash') AS SumCount".format(state.association))[0][0])
|
||||||
self.kivy_state_obj.draft_count = str(sqlQuery(
|
self.kivy_state_obj.draft_count = str(sqlQuery(
|
||||||
"SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and"
|
"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))
|
state.all_count = str(int(state.sent_count) + int(state.inbox_count))
|
||||||
if msg_counter_objs:
|
if msg_counter_objs:
|
||||||
msg_counter_objs.send_cnt.badge_text = state.sent_count
|
msg_counter_objs.send_cnt.badge_text = state.sent_count
|
||||||
|
|
Reference in New Issue
Block a user