Update login.py

This commit is contained in:
shekhar-cis 2022-06-24 20:33:27 +05:30
parent faa729d680
commit a2c9390398
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7

View File

@ -6,6 +6,7 @@ from kivy.properties import StringProperty, BooleanProperty
from kivy.uix.boxlayout import BoxLayout from kivy.uix.boxlayout import BoxLayout
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
from kivy.uix.screenmanager import Screen from kivy.uix.screenmanager import Screen
from kivy.app import App
import state import state
@ -56,16 +57,16 @@ class Random(Screen):
payloadLengthExtraBytes)) payloadLengthExtraBytes))
self.parent.parent.ids.toolbar.opacity = 1 self.parent.parent.ids.toolbar.opacity = 1
self.parent.parent.ids.toolbar.disabled = False self.parent.parent.ids.toolbar.disabled = False
state.kivyapp.loadMyAddressScreen(True) App.get_running_app().loadMyAddressScreen(True)
self.manager.current = 'myaddress' self.manager.current = 'myaddress'
Clock.schedule_once(self.address_created_callback, 6) Clock.schedule_once(self.address_created_callback, 6)
def address_created_callback(self, dt=0): # pylint: disable=unused-argument def address_created_callback(self, dt=0): # pylint: disable=unused-argument
"""New address created""" """New address created"""
state.kivyapp.loadMyAddressScreen(False) App.get_running_app().loadMyAddressScreen(False)
state.kivyapp.root.ids.sc10.ids.ml.clear_widgets() App.get_running_app().root.ids.sc10.ids.ml.clear_widgets()
state.kivyapp.root.ids.sc10.is_add_created = True App.get_running_app().root.ids.sc10.is_add_created = True
state.kivyapp.root.ids.sc10.init_ui() App.get_running_app().root.ids.sc10.init_ui()
self.reset_address_spinner() self.reset_address_spinner()
toast('New address created') toast('New address created')