Update helper_sent trash query, update common.py

This commit is contained in:
shekhar-cis 2022-07-11 18:01:26 +05:30
parent 9d28e0b70c
commit 12675ceefb
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7
3 changed files with 22 additions and 20 deletions

View File

@ -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"

View File

@ -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:

View File

@ -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()