fixed initial address disable issue in kivy
This commit is contained in:
parent
b53f0a44c0
commit
2fc9a33fa4
|
@ -538,7 +538,7 @@ class MyAddress(Screen):
|
||||||
avatarImageFirstLetter(item['text'].strip()))))
|
avatarImageFirstLetter(item['text'].strip()))))
|
||||||
meny.bind(on_press=partial(
|
meny.bind(on_press=partial(
|
||||||
self.myadd_detail, item['secondary_text'], item['text']))
|
self.myadd_detail, item['secondary_text'], item['text']))
|
||||||
if state.association == item['secondary_text']:
|
if state.association == item['secondary_text'] and is_enable == 'true':
|
||||||
badge_obj = BadgeText(
|
badge_obj = BadgeText(
|
||||||
size_hint=(None, None),
|
size_hint=(None, None),
|
||||||
size=[90 if platform == 'android' else 50, 60],
|
size=[90 if platform == 'android' else 50, 60],
|
||||||
|
@ -2092,7 +2092,9 @@ class NavigateApp(MDApp):
|
||||||
def getDefaultAccData(self, instance):
|
def getDefaultAccData(self, instance):
|
||||||
"""Getting Default Account Data"""
|
"""Getting Default Account Data"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
img = identiconGeneration.generate(BMConfigParser().addresses()[0])
|
first_addr = BMConfigParser().addresses()[0]
|
||||||
|
if BMConfigParser().get(str(first_addr), 'enabled') == 'true':
|
||||||
|
img = identiconGeneration.generate(first_addr)
|
||||||
# self.createFolder(state.imageDir + '/default_identicon/')
|
# self.createFolder(state.imageDir + '/default_identicon/')
|
||||||
# if platform == 'android':
|
# if platform == 'android':
|
||||||
# # android_path = os.path.expanduser
|
# # android_path = os.path.expanduser
|
||||||
|
@ -2110,7 +2112,7 @@ class NavigateApp(MDApp):
|
||||||
# BMConfigParser().addresses()[0]))
|
# BMConfigParser().addresses()[0]))
|
||||||
instance.parent.parent.parent.parent.parent.ids.top_box.children[0].texture = (
|
instance.parent.parent.parent.parent.parent.ids.top_box.children[0].texture = (
|
||||||
img.texture)
|
img.texture)
|
||||||
return BMConfigParser().addresses()[0]
|
return first_addr
|
||||||
return 'Select Address'
|
return 'Select Address'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -2134,8 +2136,10 @@ class NavigateApp(MDApp):
|
||||||
def get_default_logo():
|
def get_default_logo():
|
||||||
"""Getting default logo image"""
|
"""Getting default logo image"""
|
||||||
if BMConfigParser().addresses():
|
if BMConfigParser().addresses():
|
||||||
|
first_addr = BMConfigParser().addresses()[0]
|
||||||
|
if BMConfigParser().get(str(first_addr), 'enabled') == 'true':
|
||||||
return state.imageDir + '/default_identicon/{}.png'.format(
|
return state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
BMConfigParser().addresses()[0])
|
first_addr)
|
||||||
return state.imageDir + '/drawer_logo1.png'
|
return state.imageDir + '/drawer_logo1.png'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -2389,6 +2393,8 @@ class NavigateApp(MDApp):
|
||||||
else:
|
else:
|
||||||
addr = BMConfigParser().addresses()[0]
|
addr = BMConfigParser().addresses()[0]
|
||||||
first_name = BMConfigParser().get(addr, 'label')
|
first_name = BMConfigParser().get(addr, 'label')
|
||||||
|
if BMConfigParser().get(addr, 'enabled') != 'true':
|
||||||
|
return ''
|
||||||
f_name = first_name.split()
|
f_name = first_name.split()
|
||||||
label = f_name[0][:14].capitalize() + '...' if len(
|
label = f_name[0][:14].capitalize() + '...' if len(
|
||||||
f_name[0]) > 15 else f_name[0].capitalize()
|
f_name[0]) > 15 else f_name[0].capitalize()
|
||||||
|
|
Reference in New Issue
Block a user