Separate search_address backend from kivy

This commit is contained in:
shekhar-cis 2022-05-04 21:09:07 +05:30
parent 337c186865
commit 15630ed5a5
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7

View File

@ -194,3 +194,8 @@ class BMConfigParser(configparser.ConfigParser):
if value < 0 or value > 8: if value < 0 or value > 8:
return False return False
return True return True
@staticmethod
def search_addresses(address, searched_text):
return [x for x in [BMConfigParser().get(address, 'label').lower(), address.lower()]
if searched_text in x]