From 2813912b1087c79ea98226008faad76b10324b2c Mon Sep 17 00:00:00 2001 From: navjot Date: Mon, 27 Apr 2020 17:57:45 +0530 Subject: [PATCH] worked on fixing spinner UI designing issue --- src/bitmessagekivy/mpybit.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 2e2f2900..e56bf76b 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -1020,15 +1020,24 @@ class Random(Screen): self.manager.current = 'myaddress' Clock.schedule_once(self.address_created_callback, 6) - @staticmethod - def address_created_callback(dt=0): + def address_created_callback(self, dt=0): """New address created""" state.kivyapp.loadMyAddressScreen(False) state.kivyapp.root.ids.sc10.ids.ml.clear_widgets() state.kivyapp.root.ids.sc10.is_add_created = True state.kivyapp.root.ids.sc10.init_ui() + self.reset_address_spinner() toast('New address created') + def reset_address_spinner(self): + """reseting spinner address and UI""" + addresses = [addr for addr in BMConfigParser().addresses() + if BMConfigParser().get(str(addr), 'enabled') == 'true'] + self.manager.parent.ids.content_drawer.ids.btn.values = [] + self.manager.parent.ids.sc3.children[1].ids.btn.values = [] + self.manager.parent.ids.content_drawer.ids.btn.values = addresses + self.manager.parent.ids.sc3.children[1].ids.btn.values = addresses + @staticmethod def add_validation(instance): """Checking validation at address creation time"""