fixed draft or trash screen update issue

This commit is contained in:
navjot 2019-12-18 16:48:23 +05:30
parent 518e0a42c9
commit 55d1a4f4e1
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
2 changed files with 16 additions and 23 deletions

View File

@ -552,12 +552,6 @@ NavigationLayout:
color: (1,1,1,1) color: (1,1,1,1)
halign: 'center' halign: 'center'
<AddressSuccessful>:
name: 'add_sucess'
Label:
text: 'Successfully created a new bit address'
color: 0,0,0,1
<Setting>: <Setting>:
name: 'set' name: 'set'
ScrollView: ScrollView:
@ -665,7 +659,7 @@ NavigationLayout:
do_scroll_x: False do_scroll_x: False
BoxLayout: BoxLayout:
orientation: 'vertical' orientation: 'vertical'
padding: [dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1 if app.window_size[0] <= 800 else app.window_size[0]/18), dp(10)] padding: [dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/6 if app.window_size[0] <= 800 else app.window_size[0]/18), dp(10)]
spacing: 12 spacing: 12
size_hint_y: None size_hint_y: None
height: self.minimum_height + dp(app.window_size[1]) if app.window_size[1] > app.window_size[0] else dp(app.window_size[0]) height: self.minimum_height + dp(app.window_size[1]) if app.window_size[1] > app.window_size[0] else dp(app.window_size[0])

View File

@ -409,11 +409,9 @@ class MyAddress(Screen):
@staticmethod @staticmethod
def filter_address(address): def filter_address(address):
"""Method will filter the my address list data""" """Method will filter the my address list data"""
# if filter(lambda x: (state.searcing_text).lower() in x, [ if filter(lambda x: (state.searcing_text).lower() in x, [
# BMConfigParser().get( BMConfigParser().get(
# address, 'label').lower(), address.lower()]): address, 'label').lower(), address.lower()]):
if [x for x in [BMConfigParser().get(
address, 'label').lower(), address.lower()]]:
return True return True
return False return False
@ -608,8 +606,6 @@ class DropDownWidget(BoxLayout):
str(state.send_draft_mail)) str(state.send_draft_mail))
self.parent.parent.screens[15].clear_widgets() self.parent.parent.screens[15].clear_widgets()
self.parent.parent.screens[15].add_widget(Draft()) self.parent.parent.screens[15].add_widget(Draft())
state.detailPageType = ''
state.send_draft_mail = None
else: else:
toAddress = addBMIfNotPresent(toAddress) toAddress = addBMIfNotPresent(toAddress)
statusIconColor = 'red' statusIconColor = 'red'
@ -648,6 +644,12 @@ class DropDownWidget(BoxLayout):
state.check_sent_acc = fromAddress state.check_sent_acc = fromAddress
state.msg_counter_objs = self.parent.parent.parent.parent\ state.msg_counter_objs = self.parent.parent.parent.parent\
.parent.parent.children[2].children[0].ids .parent.parent.children[2].children[0].ids
if state.detailPageType == 'draft' \
and state.send_draft_mail:
state.draft_count = str(int(state.draft_count) - 1)
state.msg_counter_objs.draft_cnt.badge_text = state.draft_count
state.detailPageType = ''
state.send_draft_mail = None
# self.parent.parent.screens[0].ids.ml.clear_widgets() # self.parent.parent.screens[0].ids.ml.clear_widgets()
# self.parent.parent.screens[0].loadMessagelist(state.association) # self.parent.parent.screens[0].loadMessagelist(state.association)
self.parent.parent.screens[3].update_sent_messagelist() self.parent.parent.screens[3].update_sent_messagelist()
@ -884,16 +886,12 @@ class Sent(Screen):
def init_ui(self, dt=0): def init_ui(self, dt=0):
"""Clock Schdule for method sent accounts""" """Clock Schdule for method sent accounts"""
self.sentaccounts()
print dt
def sentaccounts(self):
"""Load sent accounts."""
self.account = state.association
self.loadSent() self.loadSent()
print dt
def loadSent(self, where="", what=""): def loadSent(self, where="", what=""):
"""Load Sent list for Sent messages.""" """Load Sent list for Sent messages."""
self.account = state.association
if state.searcing_text: if state.searcing_text:
self.ids.scroll_y.scroll_y = 1.0 self.ids.scroll_y.scroll_y = 1.0
where = ['subject', 'message'] where = ['subject', 'message']
@ -1987,8 +1985,8 @@ class MailDetail(Screen):
int(state.all_count) - 1) int(state.all_count) - 1)
state.trash_count = str(int(state.trash_count) + 1) state.trash_count = str(int(state.trash_count) + 1)
state.all_count = str(int(state.all_count) - 1) state.all_count = str(int(state.all_count) - 1)
self.parent.screens[4].ids.ml.clear_widgets() self.parent.screens[4].clear_widgets()
self.parent.screens[4].init_ui(dt=0) self.parent.screens[4].add_widget(Trash())
self.parent.screens[16].ids.ml.clear_widgets() self.parent.screens[16].ids.ml.clear_widgets()
self.parent.screens[16].init_ui(dt=0) self.parent.screens[16].init_ui(dt=0)
Clock.schedule_once(self.callback_for_delete, 4) Clock.schedule_once(self.callback_for_delete, 4)
@ -2288,7 +2286,8 @@ class Draft(Screen):
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.parent.parent.children[
2].children[0].ids)
except Exception: except Exception:
msg_count_objs = self.parent.parent.parent.parent.parent.children[ msg_count_objs = self.parent.parent.parent.parent.parent.children[
2].children[0].ids 2].children[0].ids