From a4d173cc1148fe70d6cdb385f191b273e03b344c Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Thu, 7 Jul 2022 18:02:06 +0530 Subject: [PATCH] Reused mail_detail_screen() from common.py --- src/bitmessagekivy/baseclass/allmail.py | 27 ++++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/bitmessagekivy/baseclass/allmail.py b/src/bitmessagekivy/baseclass/allmail.py index c22a96fa..9474c856 100644 --- a/src/bitmessagekivy/baseclass/allmail.py +++ b/src/bitmessagekivy/baseclass/allmail.py @@ -14,7 +14,7 @@ import state from bitmessagekivy.baseclass.common import ( showLimitedCnt, toast, ThemeClsColor, avatarImageFirstLetter, CutsomSwipeToDeleteItem, - ShowTimeHistoy + ShowTimeHistoy, mail_detail_screen ) from bitmessagekivy.baseclass.maildetail import MailDetail # from bitmessagekivy.baseclass.trash import Trash @@ -144,19 +144,22 @@ class Allmails(Screen): def mail_detail(self, unique_id, folder, instance, *args): """Load sent and inbox mail details""" + # import pdb;pdb.set_trace() if instance.state == 'closed': instance.ids.delete_msg.disabled = True - if instance.open_progress == 0.0: - state.detailPageType = folder - state.is_allmail = True - state.mail_id = unique_id - if self.manager: - src_mng_obj = self.manager - else: - src_mng_obj = self.parent.parent - src_mng_obj.screens[11].clear_widgets() - src_mng_obj.screens[11].add_widget(MailDetail()) - src_mng_obj.current = 'mailDetail' + state.is_allmail = True + mail_detail_screen(self, unique_id, instance, folder, *args) + + # if instance.open_progress == 0.0: + # state.detailPageType = folder + # state.mail_id = unique_id + # if self.manager: + # src_mng_obj = self.manager + # else: + # src_mng_obj = self.parent.parent + # src_mng_obj.screens[11].clear_widgets() + # src_mng_obj.screens[11].add_widget(MailDetail()) + # src_mng_obj.current = 'mailDetail' else: instance.ids.delete_msg.disabled = False