worked on android devices toast issue
This commit is contained in:
parent
91b4284c58
commit
7298726ab7
|
@ -55,8 +55,7 @@
|
||||||
<ContentNavigationDrawer@Navigatorss>:
|
<ContentNavigationDrawer@Navigatorss>:
|
||||||
drawer_logo: app.address_identicon()
|
drawer_logo: app.address_identicon()
|
||||||
NavigationDrawerDivider:
|
NavigationDrawerDivider:
|
||||||
|
NavigationDrawerSubheader:
|
||||||
NavigationDrawerTwoLineListItem:
|
|
||||||
text: "Accounts"
|
text: "Accounts"
|
||||||
NavigationDrawerIconButton:
|
NavigationDrawerIconButton:
|
||||||
CustomSpinner:
|
CustomSpinner:
|
||||||
|
|
|
@ -61,9 +61,8 @@ import identiconGeneration
|
||||||
|
|
||||||
def toast(text):
|
def toast(text):
|
||||||
"""Method will display the toast message."""
|
"""Method will display the toast message."""
|
||||||
if platform == 'linux':
|
from kivymd.toast.kivytoast import toast # pylint: disable=redefined-outer-name
|
||||||
from kivymd.toast.kivytoast import toast # pylint: disable=redefined-outer-name
|
toast(text)
|
||||||
toast(text)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -379,8 +378,9 @@ class AddressBook(Screen):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def refreshs(*args):
|
def refreshs(*args):
|
||||||
"""Refresh the Widget."""
|
"""Refresh the Widget."""
|
||||||
state.navinstance.ids.sc11.ids.ml.clear_widgets()
|
# state.navinstance.ids.sc11.ids.ml.clear_widgets()
|
||||||
state.navinstance.ids.sc11.loadAddresslist(None, 'All', '')
|
# state.navinstance.ids.sc11.loadAddresslist(None, 'All', '')
|
||||||
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def addBook_detail(address, label, *args):
|
def addBook_detail(address, label, *args):
|
||||||
|
@ -1094,7 +1094,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
|
||||||
"""Getting default image on address"""
|
"""Getting default image on address"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
return './images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0])
|
return './images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0])
|
||||||
return ''
|
return './images/no_identicons.png'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def addressexist():
|
def addressexist():
|
||||||
|
@ -1299,10 +1299,12 @@ class GrashofPopup(Popup):
|
||||||
stored_address = [addr[1] for addr in kivy_helper_search.search_sql(
|
stored_address = [addr[1] for addr in kivy_helper_search.search_sql(
|
||||||
folder="addressbook")]
|
folder="addressbook")]
|
||||||
if label and address and address not in stored_address:
|
if label and address and address not in stored_address:
|
||||||
state.navinstance = self.parent.children[1]
|
# state.navinstance = self.parent.children[1]
|
||||||
queues.UISignalQueue.put(('rerenderAddressBook', ''))
|
queues.UISignalQueue.put(('rerenderAddressBook', ''))
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
sqlExecute("INSERT INTO addressbook VALUES(?,?)", label, address)
|
sqlExecute("INSERT INTO addressbook VALUES(?,?)", label, address)
|
||||||
|
state.kivyapp.root.ids.sc11.ids.ml.clear_widgets()
|
||||||
|
state.kivyapp.root.ids.sc11.loadAddresslist(None, 'All', '')
|
||||||
self.parent.children[1].ids.scr_mngr.current = 'addressbook'
|
self.parent.children[1].ids.scr_mngr.current = 'addressbook'
|
||||||
toast('Saved')
|
toast('Saved')
|
||||||
|
|
||||||
|
@ -1809,16 +1811,12 @@ class Allmails(Screen):
|
||||||
|
|
||||||
def loadMessagelist(self, account, where="", what=""):
|
def loadMessagelist(self, account, where="", what=""):
|
||||||
"""Load Inbox, Sent anf Draft list of messages."""
|
"""Load Inbox, Sent anf Draft list of messages."""
|
||||||
inbox = sqlQuery(
|
all_mails = sqlQuery(
|
||||||
"SELECT toaddress, fromaddress, subject, message, folder, msgid from\
|
"SELECT toaddress, fromaddress, subject, message, folder, ackdata As id, DATE(lastactiontime) As actionTime \
|
||||||
inbox WHERE folder = 'inbox' and toaddress = '{}';".format(
|
FROM sent \
|
||||||
account))
|
UNION \
|
||||||
sent_and_draft = sqlQuery(
|
SELECT toaddress, fromaddress, subject, message, folder, msgid As id, DATE(received) As actionTime \
|
||||||
"SELECT toaddress, fromaddress, subject, message, folder, ackdata from sent \
|
FROM inbox ORDER BY actionTime DESC")
|
||||||
WHERE folder = 'sent' and fromaddress = '{}';".format(
|
|
||||||
account))
|
|
||||||
|
|
||||||
all_mails = inbox + sent_and_draft
|
|
||||||
if all_mails:
|
if all_mails:
|
||||||
state.kivyapp.root.children[2].children[0].ids.allmail_cnt.badge_text = str(len(all_mails))
|
state.kivyapp.root.children[2].children[0].ids.allmail_cnt.badge_text = str(len(all_mails))
|
||||||
state.all_count = str(len(all_mails))
|
state.all_count = str(len(all_mails))
|
||||||
|
|
|
@ -16,8 +16,9 @@ class UIkivySignaler(Thread):
|
||||||
if command == 'writeNewAddressToTable':
|
if command == 'writeNewAddressToTable':
|
||||||
label, address, streamNumber = data
|
label, address, streamNumber = data
|
||||||
state.kivyapp.variable_1.append(address)
|
state.kivyapp.variable_1.append(address)
|
||||||
elif command == 'rerenderAddressBook':
|
# elif command == 'rerenderAddressBook':
|
||||||
state.kivyapp.obj_1.refreshs()
|
# state.kivyapp.obj_1.refreshs()
|
||||||
|
# Need to discuss this
|
||||||
elif command == 'updateSentItemStatusByAckdata':
|
elif command == 'updateSentItemStatusByAckdata':
|
||||||
state.kivyapp.status_dispatching(data)
|
state.kivyapp.status_dispatching(data)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user