From a9f50e2af445dc22d2cc519c1881ff17798151e7 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Thu, 5 May 2022 17:22:15 +0530 Subject: [PATCH] Use kivy_state variable instead of state --- src/bitmessagekivy/baseclass/addressbook.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bitmessagekivy/baseclass/addressbook.py b/src/bitmessagekivy/baseclass/addressbook.py index 931c7ac2..dd20d181 100644 --- a/src/bitmessagekivy/baseclass/addressbook.py +++ b/src/bitmessagekivy/baseclass/addressbook.py @@ -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(