From 3691f22188001585336d720f28080904f3eb384f Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Wed, 21 Sep 2022 18:27:54 +0530 Subject: [PATCH] Fixed search myaddresses --- src/bitmessagekivy/baseclass/login.py | 4 ++-- src/bitmessagekivy/baseclass/myaddress.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bitmessagekivy/baseclass/login.py b/src/bitmessagekivy/baseclass/login.py index dba29b6f..49ccc231 100644 --- a/src/bitmessagekivy/baseclass/login.py +++ b/src/bitmessagekivy/baseclass/login.py @@ -78,9 +78,9 @@ class Random(Screen): """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.content_drawer.ids.identity_dropdown.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.content_drawer.ids.identity_dropdown.values = addresses self.manager.parent.ids.sc3.children[1].ids.btn.values = addresses @staticmethod diff --git a/src/bitmessagekivy/baseclass/myaddress.py b/src/bitmessagekivy/baseclass/myaddress.py index 3c0ade61..cba2494b 100644 --- a/src/bitmessagekivy/baseclass/myaddress.py +++ b/src/bitmessagekivy/baseclass/myaddress.py @@ -225,10 +225,10 @@ class MyAddress(Screen, HelperMyAddress): def filter_address(address): """Method will filter the my address list data""" # import pdb; pdb.set_trace() - searched_text = MyAddress().kivy_state.searcing_text.lower() - if BMConfigParser().search_addresses(address, searched_text): - return True - return False + from kivy.app import App + searched_text = App.get_running_app().kivy_state_obj.searcing_text.lower() + # if BMConfigParser().search_addresses(address, searched_text): + return bool(BMConfigParser().search_addresses(address, searched_text)) # if [x for x in [BMConfigParser().get(address, 'label').lower(), address.lower()] if (state.searcing_text).lower() in x]: def disable_address_ui(self, address, instance):