Skip to content

Commit a9f50e2

Browse files
committed
Use kivy_state variable instead of state
1 parent 6996133 commit a9f50e2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bitmessagekivy/baseclass/addressbook.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
StringProperty
1919
)
2020
from kivy.uix.screenmanager import Screen
21-
21+
from kivy.app import App
2222

2323
import state
2424

25-
2625
from bitmessagekivy.get_platform import platform
2726
from bitmessagekivy import kivy_helper_search
2827
from bitmessagekivy.baseclass.common import (
@@ -49,6 +48,8 @@ def __init__(self, *args, **kwargs):
4948
"""Getting AddressBook Details"""
5049
super(AddressBook, self).__init__(*args, **kwargs)
5150
self.addbook_popup = None
51+
self.kivy_running_app = App.get_running_app()
52+
self.kivy_state = self.kivy_running_app.kivy_state_obj
5253
Clock.schedule_once(self.init_ui, 0)
5354

5455
def init_ui(self, dt=0):
@@ -58,10 +59,10 @@ def init_ui(self, dt=0):
5859

5960
def loadAddresslist(self, account, where="", what=""):
6061
"""Clock Schdule for method AddressBook"""
61-
if state.searching_text:
62+
if self.kivy_state.searching_text:
6263
self.ids.scroll_y.scroll_y = 1.0
6364
where = ['label', 'address']
64-
what = state.searching_text
65+
what = self.kivy_state.searching_text
6566
xAddress = ''
6667
self.ids.tag_label.text = ''
6768
self.queryreturn = kivy_helper_search.search_sql(

0 commit comments

Comments
 (0)