Fixed search myaddresses

This commit is contained in:
shekhar-cis 2022-09-21 18:27:54 +05:30
parent 9f0eb0a24e
commit 3691f22188
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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):