From 12675ceefb69b2b9db92b26f06298efdcd83d547 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 11 Jul 2022 18:01:26 +0530 Subject: [PATCH] Update helper_sent trash query, update common.py --- src/bitmessagekivy/baseclass/common.py | 24 +++++++++---------- .../baseclass/common_mail_detail.py | 1 - src/bitmessagekivy/baseclass/sent.py | 17 +++++++------ 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/bitmessagekivy/baseclass/common.py b/src/bitmessagekivy/baseclass/common.py index e323ede8..97229d34 100644 --- a/src/bitmessagekivy/baseclass/common.py +++ b/src/bitmessagekivy/baseclass/common.py @@ -191,15 +191,15 @@ def mdlist_message_content(queryreturn, data, max_len=25, min_len=10): 'ackdata': mail[5], 'senttime': mail[6]}) -def mail_detail_screen(screen_name, msg_id, instance, folder, *args): - if instance.open_progress == 0.0: - state.detailPageType = folder - state.mail_id = msg_id - if screen_name.manager: - src_mng_obj = screen_name.manager - else: - src_mng_obj = screen_name.parent.parent - src_mng_obj.screens[11].clear_widgets() - from bitmessagekivy.baseclass.maildetail import MailDetail - src_mng_obj.screens[11].add_widget(MailDetail()) - src_mng_obj.current = "mailDetail" +# def mail_detail_screen(screen_name, msg_id, instance, folder, *args): +# if instance.open_progress == 0.0: +# state.detailPageType = folder +# state.mail_id = msg_id +# if screen_name.manager: +# src_mng_obj = screen_name.manager +# else: +# src_mng_obj = screen_name.parent.parent +# src_mng_obj.screens[11].clear_widgets() +# from bitmessagekivy.baseclass.maildetail import MailDetail +# src_mng_obj.screens[11].add_widget(MailDetail()) +# src_mng_obj.current = "mailDetail" diff --git a/src/bitmessagekivy/baseclass/common_mail_detail.py b/src/bitmessagekivy/baseclass/common_mail_detail.py index 8e804192..62df1b1d 100644 --- a/src/bitmessagekivy/baseclass/common_mail_detail.py +++ b/src/bitmessagekivy/baseclass/common_mail_detail.py @@ -32,7 +32,6 @@ from bitmessagekivy.baseclass.common import kivy_state_variables def mail_detail_screen(screen_name, msg_id, instance, folder, *args): kivy_state = kivy_state_variables() if instance.open_progress == 0.0: - import pdb; pdb.set_trace() kivy_state.detailPageType = folder kivy_state.mail_id = msg_id if screen_name.manager: diff --git a/src/bitmessagekivy/baseclass/sent.py b/src/bitmessagekivy/baseclass/sent.py index 16ec3050..bfa309ec 100644 --- a/src/bitmessagekivy/baseclass/sent.py +++ b/src/bitmessagekivy/baseclass/sent.py @@ -17,7 +17,7 @@ from bitmessagekivy.baseclass.common import ( toast, SwipeToDeleteItem, ShowTimeHistoy ) from bitmessagekivy.baseclass.maildetail import MailDetail - +import helper_sent class Sent(Screen): """Sent Screen class for kivy Ui""" @@ -206,17 +206,20 @@ class Sent(Screen): state.all_count = str(int(state.all_count) - 1) if int(state.sent_count) <= 0: self.ids.tag_label.text = '' - sqlExecute( - "UPDATE sent SET folder = 'trash'" - " WHERE ackdata = ?;", data_index) + # sqlExecute( + # "UPDATE sent SET folder = 'trash'" + # " WHERE ackdata = ?;", data_index) + helper_sent.trash(data_index) self.ids.ml.remove_widget(instance.parent.parent) toast('Deleted') def archive(self, data_index, instance, *args): """Archive sent mail from sent mail listing""" - sqlExecute( - "UPDATE sent SET folder = 'trash'" - " WHERE ackdata = ?;", data_index) + # sqlExecute( + # "UPDATE sent SET folder = 'trash'" + # " WHERE ackdata = ?;", data_index) + helper_sent.trash(data_index) + self.ids.ml.remove_widget(instance.parent.parent) self.update_trash()