Add empty screen label function call in trash.py

This commit is contained in:
shekhar-cis 2022-07-12 21:01:43 +05:30
parent ac0546c4f9
commit 0552b32124
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7

View File

@ -17,7 +17,7 @@ import state
from bitmessagekivy.baseclass.common import ( from bitmessagekivy.baseclass.common import (
toast, showLimitedCnt, ThemeClsColor, toast, showLimitedCnt, ThemeClsColor,
CutsomSwipeToDeleteItem, ShowTimeHistoy, CutsomSwipeToDeleteItem, ShowTimeHistoy,
avatarImageFirstLetter avatarImageFirstLetter, empty_screen_label
) )
@ -28,6 +28,7 @@ class Trash(Screen):
has_refreshed = True has_refreshed = True
delete_index = None delete_index = None
table_name = StringProperty() table_name = StringProperty()
no_msg_found_str = "Yet no trashed message for this account!"
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""Trash method, delete sent message and add in Trash""" """Trash method, delete sent message and add in Trash"""
@ -51,14 +52,14 @@ class Trash(Screen):
self.ids.scroll_y.bind(scroll_y=self.check_scroll_y) self.ids.scroll_y.bind(scroll_y=self.check_scroll_y)
else: else:
self.set_TrashCnt('0') self.set_TrashCnt('0')
content = MDLabel( # content = MDLabel(
font_style='Caption', # font_style='Caption',
theme_text_color='Primary', # theme_text_color='Primary',
text="yet no trashed message for this account!!!!!!!!!!!!!", # text="yet no trashed message for this account!!!!!!!!!!!!!",
halign='center', # halign='center',
size_hint_y=None, # size_hint_y=None,
valign='top') # valign='top')
self.ids.ml.add_widget(content) self.ids.ml.add_widget(empty_screen_label(self.no_msg_found_str))
def trashDataQuery(self, start_indx, end_indx): def trashDataQuery(self, start_indx, end_indx):
"""Trash message query""" """Trash message query"""