Update variable association to selected_address
This commit is contained in:
parent
ccb0796351
commit
22aec0159b
|
@ -152,7 +152,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
|
||||||
msg_count_objs.send_cnt.ids.badge_txt.text = str(int(self.kivy_state.sent_count) - 1)
|
msg_count_objs.send_cnt.ids.badge_txt.text = str(int(self.kivy_state.sent_count) - 1)
|
||||||
self.kivy_state.sent_count = str(int(self.kivy_state.sent_count) - 1)
|
self.kivy_state.sent_count = str(int(self.kivy_state.sent_count) - 1)
|
||||||
self.parent.screens[2].ids.ml.clear_widgets()
|
self.parent.screens[2].ids.ml.clear_widgets()
|
||||||
self.parent.screens[2].loadSent(self.kivy_state.association)
|
self.parent.screens[2].loadSent(self.kivy_state.selected_address)
|
||||||
elif self.kivy_state.detail_page_type == 'inbox':
|
elif self.kivy_state.detail_page_type == 'inbox':
|
||||||
App.get_running_app().root.ids.sc1.ids.inbox_search.ids.search_field.text = ''
|
App.get_running_app().root.ids.sc1.ids.inbox_search.ids.search_field.text = ''
|
||||||
trash(self.kivy_state.mail_id)
|
trash(self.kivy_state.mail_id)
|
||||||
|
@ -160,7 +160,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
|
||||||
int(self.kivy_state.inbox_count) - 1)
|
int(self.kivy_state.inbox_count) - 1)
|
||||||
self.kivy_state.inbox_count = str(int(self.kivy_state.inbox_count) - 1)
|
self.kivy_state.inbox_count = str(int(self.kivy_state.inbox_count) - 1)
|
||||||
self.parent.screens[0].ids.ml.clear_widgets()
|
self.parent.screens[0].ids.ml.clear_widgets()
|
||||||
self.parent.screens[0].loadMessagelist(self.kivy_state.association)
|
self.parent.screens[0].loadMessagelist(self.kivy_state.selected_address)
|
||||||
|
|
||||||
elif self.kivy_state.detail_page_type == 'draft':
|
elif self.kivy_state.detail_page_type == 'draft':
|
||||||
delete(self.kivy_state.mail_id)
|
delete(self.kivy_state.mail_id)
|
||||||
|
|
|
@ -131,7 +131,7 @@ class MyAddress(Screen, HelperMyAddress):
|
||||||
|
|
||||||
def set_address_status(self, item, meny, is_enable):
|
def set_address_status(self, item, meny, is_enable):
|
||||||
"""Setting the identity status enable/disable on UI"""
|
"""Setting the identity status enable/disable on UI"""
|
||||||
if self.kivy_state.association == item['secondary_text'] and is_enable:
|
if self.kivy_state.selected_address == item['secondary_text'] and is_enable:
|
||||||
meny.add_widget(self.is_active_badge())
|
meny.add_widget(self.is_active_badge())
|
||||||
else:
|
else:
|
||||||
meny.add_widget(ToggleBtn(active=True if is_enable else False))
|
meny.add_widget(ToggleBtn(active=True if is_enable else False))
|
||||||
|
|
|
@ -13,7 +13,7 @@ class KivyStateVariables(object):
|
||||||
"""This Class hold all the kivy state variables"""
|
"""This Class hold all the kivy state variables"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.association = ''
|
self.selected_address = ''
|
||||||
self.navinstance = None
|
self.navinstance = None
|
||||||
self.mail_id = 0
|
self.mail_id = 0
|
||||||
self.my_address_obj = None
|
self.my_address_obj = None
|
||||||
|
|
|
@ -253,15 +253,15 @@ class NavigateApp(MDApp):
|
||||||
if not os.path.exists(os.path.join(android_path, 'default_identicon')):
|
if not os.path.exists(os.path.join(android_path, 'default_identicon')):
|
||||||
os.makedirs(os.path.join(android_path, 'default_identicon'))
|
os.makedirs(os.path.join(android_path, 'default_identicon'))
|
||||||
newImg.save(os.path.join(android_path, 'default_identicon', '{}.png'.format(
|
newImg.save(os.path.join(android_path, 'default_identicon', '{}.png'.format(
|
||||||
self.kivy_state_obj.association))
|
self.kivy_state_obj.selected_address))
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if not os.path.exists(os.path.join(self.image_dir, 'default_identicon')):
|
if not os.path.exists(os.path.join(self.image_dir, 'default_identicon')):
|
||||||
os.makedirs(os.path.join(self.image_dir, 'default_identicon'))
|
os.makedirs(os.path.join(self.image_dir, 'default_identicon'))
|
||||||
newImg.save(os.path.join(self.image_dir, 'default_identicon', '{0}.png'.format(
|
newImg.save(os.path.join(self.image_dir, 'default_identicon', '{0}.png'.format(
|
||||||
self.kivy_state_obj.association))
|
self.kivy_state_obj.selected_address))
|
||||||
)
|
)
|
||||||
self.load_selected_Image(self.kivy_state_obj.association)
|
self.load_selected_Image(self.kivy_state_obj.selected_address)
|
||||||
toast('Image changed')
|
toast('Image changed')
|
||||||
except Exception:
|
except Exception:
|
||||||
toast('Exit')
|
toast('Exit')
|
||||||
|
@ -282,9 +282,9 @@ class NavigateApp(MDApp):
|
||||||
|
|
||||||
def rest_default_avatar_img(self):
|
def rest_default_avatar_img(self):
|
||||||
"""set default avatar generated image"""
|
"""set default avatar generated image"""
|
||||||
self.set_identicon(self.kivy_state_obj.association)
|
self.set_identicon(self.kivy_state_obj.selected_address)
|
||||||
img_path = os.path.join(
|
img_path = os.path.join(
|
||||||
self.image_dir, 'default_identicon', '{}.png'.format(self.kivy_state_obj.association)
|
self.image_dir, 'default_identicon', '{}.png'.format(self.kivy_state_obj.selected_address)
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
if os.path.exists(img_path):
|
if os.path.exists(img_path):
|
||||||
|
|
Reference in New Issue
Block a user