Use kivy_state variable instead of state

This commit is contained in:
shekhar-cis 2022-05-05 17:22:15 +05:30
parent 69961335bf
commit a9f50e2af4
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7

View File

@ -18,11 +18,10 @@ from kivy.properties import (
StringProperty
)
from kivy.uix.screenmanager import Screen
from kivy.app import App
import state
from bitmessagekivy.get_platform import platform
from bitmessagekivy import kivy_helper_search
from bitmessagekivy.baseclass.common import (
@ -49,6 +48,8 @@ class AddressBook(Screen, HelperAddressBook):
"""Getting AddressBook Details"""
super(AddressBook, self).__init__(*args, **kwargs)
self.addbook_popup = None
self.kivy_running_app = App.get_running_app()
self.kivy_state = self.kivy_running_app.kivy_state_obj
Clock.schedule_once(self.init_ui, 0)
def init_ui(self, dt=0):
@ -58,10 +59,10 @@ class AddressBook(Screen, HelperAddressBook):
def loadAddresslist(self, account, where="", what=""):
"""Clock Schdule for method AddressBook"""
if state.searching_text:
if self.kivy_state.searching_text:
self.ids.scroll_y.scroll_y = 1.0
where = ['label', 'address']
what = state.searching_text
what = self.kivy_state.searching_text
xAddress = ''
self.ids.tag_label.text = ''
self.queryreturn = kivy_helper_search.search_sql(