Update variable association to selected_address

This commit is contained in:
shekhar-cis 2022-10-27 13:27:30 +05:30
parent ccb0796351
commit 22aec0159b
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7
4 changed files with 9 additions and 9 deletions

View File

@ -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)
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].loadSent(self.kivy_state.association)
self.parent.screens[2].loadSent(self.kivy_state.selected_address)
elif self.kivy_state.detail_page_type == 'inbox':
App.get_running_app().root.ids.sc1.ids.inbox_search.ids.search_field.text = ''
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)
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].loadMessagelist(self.kivy_state.association)
self.parent.screens[0].loadMessagelist(self.kivy_state.selected_address)
elif self.kivy_state.detail_page_type == 'draft':
delete(self.kivy_state.mail_id)

View File

@ -131,7 +131,7 @@ class MyAddress(Screen, HelperMyAddress):
def set_address_status(self, item, meny, is_enable):
"""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())
else:
meny.add_widget(ToggleBtn(active=True if is_enable else False))

View File

@ -13,7 +13,7 @@ class KivyStateVariables(object):
"""This Class hold all the kivy state variables"""
def __init__(self):
self.association = ''
self.selected_address = ''
self.navinstance = None
self.mail_id = 0
self.my_address_obj = None

View File

@ -253,15 +253,15 @@ class NavigateApp(MDApp):
if not os.path.exists(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(
self.kivy_state_obj.association))
self.kivy_state_obj.selected_address))
)
else:
if not os.path.exists(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(
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')
except Exception:
toast('Exit')
@ -282,9 +282,9 @@ class NavigateApp(MDApp):
def rest_default_avatar_img(self):
"""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(
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:
if os.path.exists(img_path):