Pylint Fixes part2
This commit is contained in:
commit
1ef456abf4
|
@ -117,10 +117,11 @@
|
||||||
badge_text: app.mail_count(self.text)
|
badge_text: app.mail_count(self.text)
|
||||||
on_press: app.check_search_screen(self)
|
on_press: app.check_search_screen(self)
|
||||||
NavigationDrawerIconButton:
|
NavigationDrawerIconButton:
|
||||||
|
id: allmail_cnt
|
||||||
text: "All Mails"
|
text: "All Mails"
|
||||||
icon:'contact-mail'
|
icon:'contact-mail'
|
||||||
on_release: app.root.ids.scr_mngr.current = 'inbox'
|
on_release: app.root.ids.scr_mngr.current = 'allmails'
|
||||||
badge_text: "999+"
|
badge_text: app.mail_count(self.text)
|
||||||
on_press: app.check_search_screen(self)
|
on_press: app.check_search_screen(self)
|
||||||
NavigationDrawerDivider:
|
NavigationDrawerDivider:
|
||||||
NavigationDrawerSubheader:
|
NavigationDrawerSubheader:
|
||||||
|
@ -233,6 +234,8 @@ NavigationLayout:
|
||||||
id:sc15
|
id:sc15
|
||||||
Draft:
|
Draft:
|
||||||
id:sc16
|
id:sc16
|
||||||
|
Allmails:
|
||||||
|
id:sc17
|
||||||
|
|
||||||
|
|
||||||
<Inbox>:
|
<Inbox>:
|
||||||
|
@ -270,6 +273,17 @@ NavigationLayout:
|
||||||
id: ml
|
id: ml
|
||||||
ComposerButton:
|
ComposerButton:
|
||||||
|
|
||||||
|
<Allmails>:
|
||||||
|
name: 'allmails'
|
||||||
|
FloatLayout:
|
||||||
|
MDScrollViewRefreshLayout:
|
||||||
|
id: refresh_layout
|
||||||
|
refresh_callback: root.refresh_callback
|
||||||
|
root_layout: root
|
||||||
|
MDList:
|
||||||
|
id: ml
|
||||||
|
ComposerButton:
|
||||||
|
|
||||||
<Test>:
|
<Test>:
|
||||||
name: 'test'
|
name: 'test'
|
||||||
Label:
|
Label:
|
||||||
|
|
|
@ -89,6 +89,7 @@ class Inbox(Screen):
|
||||||
|
|
||||||
def loadMessagelist(self, account, where="", what=""):
|
def loadMessagelist(self, account, where="", what=""):
|
||||||
"""Load Inbox list for Inbox messages."""
|
"""Load Inbox list for Inbox messages."""
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
if state.searcing_text:
|
if state.searcing_text:
|
||||||
where = ['subject', 'message']
|
where = ['subject', 'message']
|
||||||
what = state.searcing_text
|
what = state.searcing_text
|
||||||
|
@ -273,7 +274,8 @@ class MyAddress(Screen):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def myadd_detail(self, fromaddress, label, *args):
|
@staticmethod
|
||||||
|
def myadd_detail(fromaddress, label, *args):
|
||||||
"""Myaddress Details."""
|
"""Myaddress Details."""
|
||||||
p = MyaddDetailPopup()
|
p = MyaddDetailPopup()
|
||||||
p.open()
|
p.open()
|
||||||
|
@ -296,7 +298,8 @@ class MyAddress(Screen):
|
||||||
|
|
||||||
Clock.schedule_once(refresh_callback, 1)
|
Clock.schedule_once(refresh_callback, 1)
|
||||||
|
|
||||||
def filter_address(self, address):
|
@staticmethod
|
||||||
|
def filter_address(address):
|
||||||
"""Method will filter the my address list data."""
|
"""Method will filter the my address list data."""
|
||||||
if filter(lambda x: (
|
if filter(lambda x: (
|
||||||
state.searcing_text).lower() in x, [
|
state.searcing_text).lower() in x, [
|
||||||
|
@ -371,12 +374,14 @@ class AddressBook(Screen):
|
||||||
valign='top')
|
valign='top')
|
||||||
self.ids.ml.add_widget(content)
|
self.ids.ml.add_widget(content)
|
||||||
|
|
||||||
def refreshs(self, *args):
|
@staticmethod
|
||||||
|
def refreshs(*args):
|
||||||
"""Refresh the Widget."""
|
"""Refresh the Widget."""
|
||||||
state.navinstance.ids.sc11.clear_widgets()
|
state.navinstance.ids.sc11.clear_widgets()
|
||||||
state.navinstance.ids.sc11.add_widget(AddressBook())
|
state.navinstance.ids.sc11.add_widget(AddressBook())
|
||||||
|
|
||||||
def addBook_detail(self, address, label, *args):
|
@staticmethod
|
||||||
|
def addBook_detail(address, label, *args):
|
||||||
"""Addressbook Details."""
|
"""Addressbook Details."""
|
||||||
p = AddbookDetailPopup()
|
p = AddbookDetailPopup()
|
||||||
p.open()
|
p.open()
|
||||||
|
@ -441,6 +446,7 @@ class DropDownWidget(BoxLayout):
|
||||||
|
|
||||||
def send(self):
|
def send(self):
|
||||||
"""Send message from one address to another."""
|
"""Send message from one address to another."""
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
fromAddress = str(self.ids.ti.text)
|
fromAddress = str(self.ids.ti.text)
|
||||||
toAddress = str(self.ids.txt_input.text)
|
toAddress = str(self.ids.txt_input.text)
|
||||||
subject = str(self.ids.subject.text)
|
subject = str(self.ids.subject.text)
|
||||||
|
@ -707,6 +713,8 @@ class Sent(Screen):
|
||||||
state.check_sent_acc:
|
state.check_sent_acc:
|
||||||
state.msg_counter_objs.send_cnt.badge_text = str(len(queryreturn))
|
state.msg_counter_objs.send_cnt.badge_text = str(len(queryreturn))
|
||||||
state.sent_count = str(int(state.sent_count) + 1)
|
state.sent_count = str(int(state.sent_count) + 1)
|
||||||
|
state.all_count = str(int(state.all_count) + 1)
|
||||||
|
state.msg_counter_objs.allmail_cnt.badge_text = state.all_count
|
||||||
state.check_sent_acc = None
|
state.check_sent_acc = None
|
||||||
|
|
||||||
if queryreturn:
|
if queryreturn:
|
||||||
|
@ -793,8 +801,11 @@ class Sent(Screen):
|
||||||
int(state.sent_count) - 1)
|
int(state.sent_count) - 1)
|
||||||
msg_count_objs.trash_cnt.badge_text = str(
|
msg_count_objs.trash_cnt.badge_text = str(
|
||||||
int(state.trash_count) + 1)
|
int(state.trash_count) + 1)
|
||||||
|
msg_count_objs.allmail_cnt.badge_text = str(
|
||||||
|
int(state.all_count) - 1)
|
||||||
state.sent_count = str(int(state.sent_count) - 1)
|
state.sent_count = str(int(state.sent_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)
|
||||||
sqlExecute(
|
sqlExecute(
|
||||||
"UPDATE sent SET folder = 'trash' \
|
"UPDATE sent SET folder = 'trash' \
|
||||||
WHERE lastactiontime = {};".format(data_index))
|
WHERE lastactiontime = {};".format(data_index))
|
||||||
|
@ -835,26 +846,26 @@ class Trash(Screen):
|
||||||
state.association = BMConfigParser().addresses()[0]
|
state.association = BMConfigParser().addresses()[0]
|
||||||
|
|
||||||
inbox = sqlQuery(
|
inbox = sqlQuery(
|
||||||
"SELECT toaddress, fromaddress, subject, message from inbox \
|
"SELECT toaddress, fromaddress, subject, message, folder from inbox \
|
||||||
WHERE folder = 'trash' and fromaddress = '{}';".format(
|
WHERE folder = 'trash' and toaddress = '{}';".format(
|
||||||
state.association))
|
state.association))
|
||||||
sent = sqlQuery(
|
sent = sqlQuery(
|
||||||
"SELECT toaddress, fromaddress, subject, message from sent \
|
"SELECT toaddress, fromaddress, subject, message, folder from sent \
|
||||||
WHERE folder = 'trash' and fromaddress = '{}';".format(
|
WHERE folder = 'trash' and fromaddress = '{}';".format(
|
||||||
state.association))
|
state.association))
|
||||||
trash_data = inbox + sent
|
trash_data = inbox + sent
|
||||||
|
|
||||||
for item in trash_data:
|
for item in trash_data:
|
||||||
meny = ThreeLineAvatarIconListItem(
|
meny = ThreeLineAvatarIconListItem(
|
||||||
text=item[1],
|
text='Draft' if item[4] == 'draft' else item[1],
|
||||||
secondary_text=item[2],
|
secondary_text=item[2] if item[2] else item[1],
|
||||||
theme_text_color='Custom',
|
theme_text_color='Custom',
|
||||||
text_color=NavigateApp().theme_cls.primary_color)
|
text_color=NavigateApp().theme_cls.primary_color)
|
||||||
img_latter = item[2][0].upper() if (
|
img_latter = './images/avatar.png' if item[
|
||||||
item[2][0].upper() >= 'A' and item[
|
4] == 'draft' else './images/text_images/{}.png'.format(
|
||||||
2][0].upper() <= 'Z') else '!'
|
item[2][0].upper() if (item[2][0].upper() >= 'A' and item[
|
||||||
meny.add_widget(AvatarSampleWidget(
|
2][0].upper() <= 'Z') else '!')
|
||||||
source='./images/text_images/{}.png'.format(img_latter)))
|
meny.add_widget(AvatarSampleWidget(source=img_latter))
|
||||||
self.ids.ml.add_widget(meny)
|
self.ids.ml.add_widget(meny)
|
||||||
|
|
||||||
|
|
||||||
|
@ -995,18 +1006,21 @@ class NavigateApp(App):
|
||||||
else:
|
else:
|
||||||
return "Bitmessage Login"
|
return "Bitmessage Login"
|
||||||
|
|
||||||
def addingtoaddressbook(self):
|
@staticmethod
|
||||||
|
def addingtoaddressbook():
|
||||||
"""Adding to address Book."""
|
"""Adding to address Book."""
|
||||||
p = GrashofPopup()
|
p = GrashofPopup()
|
||||||
p.open()
|
p.open()
|
||||||
|
|
||||||
def getDefaultAccData(self):
|
@staticmethod
|
||||||
|
def getDefaultAccData():
|
||||||
"""Getting Default Account Data."""
|
"""Getting Default Account Data."""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
return BMConfigParser().addresses()[0]
|
return BMConfigParser().addresses()[0]
|
||||||
return 'Select Address'
|
return 'Select Address'
|
||||||
|
|
||||||
def addressexist(self):
|
@staticmethod
|
||||||
|
def addressexist():
|
||||||
"""Checking address existence."""
|
"""Checking address existence."""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
return True
|
return True
|
||||||
|
@ -1045,7 +1059,8 @@ class NavigateApp(App):
|
||||||
self.root.ids.scr_mngr.transition.direction = 'left'
|
self.root.ids.scr_mngr.transition.direction = 'left'
|
||||||
self.root.ids.scr_mngr.transition.unbind(on_complete=self.restart)
|
self.root.ids.scr_mngr.transition.unbind(on_complete=self.restart)
|
||||||
|
|
||||||
def status_dispatching(self, data):
|
@staticmethod
|
||||||
|
def status_dispatching(data):
|
||||||
"""Method used for status dispatching acknowledgment."""
|
"""Method used for status dispatching acknowledgment."""
|
||||||
ackData, message = data
|
ackData, message = data
|
||||||
if state.ackdata == ackData:
|
if state.ackdata == ackData:
|
||||||
|
@ -1062,13 +1077,15 @@ class NavigateApp(App):
|
||||||
composer_obj.txt_input.text = ''
|
composer_obj.txt_input.text = ''
|
||||||
composer_obj.subject.text = ''
|
composer_obj.subject.text = ''
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def on_stop(self):
|
def on_stop(self):
|
||||||
"""On stop methos is used for stoping the runing script."""
|
"""On stop methos is used for stoping the runing script."""
|
||||||
print "*******************EXITING FROM APPLICATION*******************"
|
print "*******************EXITING FROM APPLICATION*******************"
|
||||||
import shutdown
|
import shutdown
|
||||||
shutdown.doCleanShutdown()
|
shutdown.doCleanShutdown()
|
||||||
|
|
||||||
def mail_count(self, text):
|
@staticmethod
|
||||||
|
def mail_count(text):
|
||||||
"""Counting Mail numbers."""
|
"""Counting Mail numbers."""
|
||||||
if state.association == '':
|
if state.association == '':
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
|
@ -1098,8 +1115,16 @@ class NavigateApp(App):
|
||||||
folder = '{0}' ;".format(
|
folder = '{0}' ;".format(
|
||||||
text.lower(), state.association))[0][0])
|
text.lower(), state.association))[0][0])
|
||||||
return state.draft_count
|
return state.draft_count
|
||||||
|
elif text == 'All Mails':
|
||||||
|
state.all_count = str(sqlQuery(
|
||||||
|
"SELECT (SELECT count(*) FROM sent where fromaddress = '{0}' and \
|
||||||
|
folder != 'trash' )+(SELECT count(*) FROM inbox where \
|
||||||
|
toaddress = '{0}' and folder != 'trash') AS SumCount".format(
|
||||||
|
state.association))[0][0])
|
||||||
|
return state.all_count
|
||||||
|
|
||||||
def current_address_label(self, current_address=None):
|
@staticmethod
|
||||||
|
def current_address_label(current_address=None):
|
||||||
"""Getting current address labels."""
|
"""Getting current address labels."""
|
||||||
if BMConfigParser().addresses() or current_address:
|
if BMConfigParser().addresses() or current_address:
|
||||||
if current_address:
|
if current_address:
|
||||||
|
@ -1325,7 +1350,9 @@ class MailDetail(Screen):
|
||||||
self.parent.parent.screens[0].add_widget(Inbox())
|
self.parent.parent.screens[0].add_widget(Inbox())
|
||||||
self.parent.parent.current = 'inbox'
|
self.parent.parent.current = 'inbox'
|
||||||
msg_count_objs.trash_cnt.badge_text = str(int(state.trash_count) + 1)
|
msg_count_objs.trash_cnt.badge_text = str(int(state.trash_count) + 1)
|
||||||
|
msg_count_objs.allmail_cnt.badge_text = str(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)
|
||||||
self.parent.parent.screens[4].clear_widgets()
|
self.parent.parent.screens[4].clear_widgets()
|
||||||
self.parent.parent.screens[4].add_widget(Trash())
|
self.parent.parent.screens[4].add_widget(Trash())
|
||||||
toast('Deleted')
|
toast('Deleted')
|
||||||
|
@ -1379,7 +1406,8 @@ class MyaddDetailPopup(Popup):
|
||||||
window_obj.scr_mngr.current = 'create'
|
window_obj.scr_mngr.current = 'create'
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
|
|
||||||
def close_pop(self):
|
@staticmethod
|
||||||
|
def close_pop():
|
||||||
"""Pop is Canceled."""
|
"""Pop is Canceled."""
|
||||||
toast('Canceled')
|
toast('Canceled')
|
||||||
|
|
||||||
|
@ -1426,7 +1454,8 @@ class AddbookDetailPopup(Popup):
|
||||||
window_obj.scr_mngr.current = 'create'
|
window_obj.scr_mngr.current = 'create'
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
|
|
||||||
def close_pop(self):
|
@staticmethod
|
||||||
|
def close_pop():
|
||||||
"""Pop is Canceled."""
|
"""Pop is Canceled."""
|
||||||
toast('Canceled')
|
toast('Canceled')
|
||||||
|
|
||||||
|
@ -1474,6 +1503,9 @@ class Draft(Screen):
|
||||||
xAddress, account, "draft", where, what, False)
|
xAddress, account, "draft", where, what, False)
|
||||||
if state.msg_counter_objs:
|
if state.msg_counter_objs:
|
||||||
state.msg_counter_objs.draft_cnt.badge_text = str(len(queryreturn))
|
state.msg_counter_objs.draft_cnt.badge_text = str(len(queryreturn))
|
||||||
|
state.all_count = str(int(state.all_count) + 1)
|
||||||
|
state.msg_counter_objs.allmail_cnt.badge_text = state.all_count
|
||||||
|
state.msg_counter_objs = None
|
||||||
|
|
||||||
if queryreturn:
|
if queryreturn:
|
||||||
for mail in queryreturn:
|
for mail in queryreturn:
|
||||||
|
@ -1524,8 +1556,14 @@ class Draft(Screen):
|
||||||
|
|
||||||
def delete_draft(self, data_index, instance, *args):
|
def delete_draft(self, data_index, instance, *args):
|
||||||
"""Method used to delete draft message permanently."""
|
"""Method used to delete draft message permanently."""
|
||||||
sqlExecute("DELETE FROM sent WHERE lastactiontime = '{}';".format(
|
sqlExecute(
|
||||||
data_index))
|
"UPDATE sent SET folder = 'draft, trash' WHERE lastactiontime = {};".format(
|
||||||
|
data_index))
|
||||||
|
# sqlExecute(
|
||||||
|
# "UPDATE sent SET folder = 'trash' WHERE lastactiontime = {};".format(
|
||||||
|
# data_index))
|
||||||
|
# sqlExecute("DELETE FROM sent WHERE lastactiontime = '{}';".format(
|
||||||
|
# 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.children[2].children[0].ids
|
||||||
|
@ -1535,12 +1573,19 @@ class Draft(Screen):
|
||||||
if int(state.draft_count) > 0:
|
if int(state.draft_count) > 0:
|
||||||
msg_count_objs.draft_cnt.badge_text = str(
|
msg_count_objs.draft_cnt.badge_text = str(
|
||||||
int(state.draft_count) - 1)
|
int(state.draft_count) - 1)
|
||||||
|
msg_count_objs.allmail_cnt.badge_text = str(
|
||||||
|
int(state.all_count) - 1)
|
||||||
|
msg_count_objs.trash_cnt.badge_text = str(
|
||||||
|
int(state.trash_count) + 1)
|
||||||
state.draft_count = str(int(state.draft_count) - 1)
|
state.draft_count = str(int(state.draft_count) - 1)
|
||||||
|
state.all_count = str(int(state.all_count) - 1)
|
||||||
|
state.trash_count = str(int(state.trash_count) + 1)
|
||||||
self.ids.ml.remove_widget(instance.parent.parent)
|
self.ids.ml.remove_widget(instance.parent.parent)
|
||||||
toast('Deleted')
|
toast('Deleted')
|
||||||
|
|
||||||
def draft_msg(self, src_object):
|
def draft_msg(self, src_object):
|
||||||
"""Method used for saving draft mails."""
|
"""Method used for saving draft mails."""
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
composer_object = src_object.children[1].children[0].children[
|
composer_object = src_object.children[1].children[0].children[
|
||||||
0].children[0].children[0].ids
|
0].children[0].children[0].ids
|
||||||
fromAddress = str(composer_object.ti.text)
|
fromAddress = str(composer_object.ti.text)
|
||||||
|
@ -1604,3 +1649,97 @@ def remove_search_bar(obj):
|
||||||
obj.parent.parent.parent.parent.parent.ids.search_bar.clear_widgets()
|
obj.parent.parent.parent.parent.parent.ids.search_bar.clear_widgets()
|
||||||
except Exception:
|
except Exception:
|
||||||
obj.parent.parent.parent.parent.ids.search_bar.clear_widgets()
|
obj.parent.parent.parent.parent.ids.search_bar.clear_widgets()
|
||||||
|
|
||||||
|
|
||||||
|
class Allmails(Screen):
|
||||||
|
"""all mails Screen uses screen to show widgets of screens."""
|
||||||
|
|
||||||
|
data = ListProperty()
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
"""Method Parsing the address."""
|
||||||
|
super(Allmails, self).__init__(*args, **kwargs)
|
||||||
|
if state.association == '':
|
||||||
|
if BMConfigParser().addresses():
|
||||||
|
state.association = BMConfigParser().addresses()[0]
|
||||||
|
Clock.schedule_once(self.init_ui, 0)
|
||||||
|
|
||||||
|
def init_ui(self, dt=0):
|
||||||
|
"""Clock Schdule for method all mails."""
|
||||||
|
self.mailaccounts()
|
||||||
|
print dt
|
||||||
|
|
||||||
|
def mailaccounts(self):
|
||||||
|
"""Load all mails for account."""
|
||||||
|
account = state.association
|
||||||
|
self.loadMessagelist(account, 'All', '')
|
||||||
|
|
||||||
|
def loadMessagelist(self, account, where="", what=""):
|
||||||
|
"""Load Inbox, Sent anf Draft list of messages."""
|
||||||
|
inbox = sqlQuery(
|
||||||
|
"SELECT toaddress, fromaddress, subject, message, folder from inbox \
|
||||||
|
WHERE folder = 'inbox' and toaddress = '{}';".format(
|
||||||
|
account))
|
||||||
|
sent_and_draft = sqlQuery(
|
||||||
|
"SELECT toaddress, fromaddress, subject, message, folder from sent \
|
||||||
|
WHERE folder != 'trash' and fromaddress = '{}';".format(
|
||||||
|
account))
|
||||||
|
|
||||||
|
all_mails = inbox + sent_and_draft
|
||||||
|
if all_mails:
|
||||||
|
for item in all_mails:
|
||||||
|
meny = ThreeLineAvatarIconListItem(
|
||||||
|
text='Draft' if item[4] == 'draft' else item[1],
|
||||||
|
secondary_text=item[1] if item[4] == 'draft' else item[2],
|
||||||
|
theme_text_color='Custom',
|
||||||
|
text_color=NavigateApp().theme_cls.primary_color)
|
||||||
|
img_latter = './images/avatar.png' if item[
|
||||||
|
4] == 'draft' else './images/text_images/{}.png'.format(
|
||||||
|
item[2][0].upper() if (
|
||||||
|
item[2][0].upper() >= 'A' and item[
|
||||||
|
2][0].upper() <= 'Z') else '!')
|
||||||
|
meny.add_widget(AvatarSampleWidget(
|
||||||
|
source=img_latter))
|
||||||
|
carousel = Carousel(direction='right')
|
||||||
|
if platform == 'android':
|
||||||
|
carousel.height = 150
|
||||||
|
elif platform == 'linux':
|
||||||
|
carousel.height = meny.height - 10
|
||||||
|
carousel.size_hint_y = None
|
||||||
|
carousel.ignore_perpendicular_swipes = True
|
||||||
|
carousel.data_index = 0
|
||||||
|
carousel.min_move = 0.2
|
||||||
|
del_btn = Button(text='Delete')
|
||||||
|
del_btn.background_normal = ''
|
||||||
|
del_btn.background_color = (1.0, 0.0, 0.0, 1.0)
|
||||||
|
carousel.add_widget(del_btn)
|
||||||
|
carousel.add_widget(meny)
|
||||||
|
carousel.index = 1
|
||||||
|
self.ids.ml.add_widget(carousel)
|
||||||
|
else:
|
||||||
|
content = MDLabel(
|
||||||
|
font_style='Body1',
|
||||||
|
theme_text_color='Primary',
|
||||||
|
text="yet no message for this account!!!!!!!!!!!!!",
|
||||||
|
halign='center',
|
||||||
|
bold=True,
|
||||||
|
size_hint_y=None,
|
||||||
|
valign='top')
|
||||||
|
self.ids.ml.add_widget(content)
|
||||||
|
|
||||||
|
def refresh_callback(self, *args):
|
||||||
|
"""A method that updates the state of your application."""
|
||||||
|
"""While the spinner remains on the screen."""
|
||||||
|
def refresh_callback(interval):
|
||||||
|
"""Method used for loading the allmails screen data."""
|
||||||
|
self.ids.ml.clear_widgets()
|
||||||
|
self.remove_widget(self.children[1])
|
||||||
|
try:
|
||||||
|
screens_obj = self.parent.screens[16]
|
||||||
|
except Exception:
|
||||||
|
screens_obj = self.parent.parent.screens[16]
|
||||||
|
screens_obj.add_widget(Allmails())
|
||||||
|
self.ids.refresh_layout.refresh_done()
|
||||||
|
self.tick = 0
|
||||||
|
|
||||||
|
Clock.schedule_once(refresh_callback, 1)
|
||||||
|
|
|
@ -98,6 +98,8 @@ trash_count = 0
|
||||||
|
|
||||||
draft_count = 0
|
draft_count = 0
|
||||||
|
|
||||||
|
all_count = 0
|
||||||
|
|
||||||
searcing_text = ''
|
searcing_text = ''
|
||||||
|
|
||||||
search_screen = ''
|
search_screen = ''
|
Reference in New Issue
Block a user