Merge pull request #83 from jaicis/Chatroom

Fixed android app crashing and build crashing issue
This commit is contained in:
navjotcis 2021-02-10 15:52:26 +05:30 committed by GitHub
commit 64c160329e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 21 deletions

View File

@ -132,7 +132,7 @@
background_normal: '' background_normal: ''
background_color: app.theme_cls.primary_color background_color: app.theme_cls.primary_color
#background_color: (0.62,0.67,0.72,1) #background_color: (0.62,0.67,0.72,1)
values: app.variable_1 # values: app.variable_1
on_text:app.getCurrentAccountData(self.text) on_text:app.getCurrentAccountData(self.text)
# Image: # Image:
# source: app.get_default_image() # source: app.get_default_image()

View File

@ -532,7 +532,10 @@ class MyAddress(Screen):
try: try:
meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5] meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
except Exception: except Exception:
try:
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5] meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
except Exception as e:
print('Exception: ', e)
meny.add_widget(AvatarSampleWidget( meny.add_widget(AvatarSampleWidget(
source=state.imageDir + '/text_images/{}.png'.format( source=state.imageDir + '/text_images/{}.png'.format(
avatarImageFirstLetter(item['text'].strip())))) avatarImageFirstLetter(item['text'].strip()))))
@ -620,6 +623,7 @@ class MyAddress(Screen):
self.init_ui() self.init_ui()
self.ids.refresh_layout.refresh_done() self.ids.refresh_layout.refresh_done()
self.tick = 0 self.tick = 0
Clock.schedule_once(self.address_permision_callback, 0)
Clock.schedule_once(refresh_callback, 1) Clock.schedule_once(refresh_callback, 1)
@staticmethod @staticmethod
@ -1948,6 +1952,7 @@ class NavigateApp(MDApp):
def getCurrentAccountData(self, text): def getCurrentAccountData(self, text):
"""Get Current Address Account Data""" """Get Current Address Account Data"""
if text != '':
if os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(text)): if os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(text)):
self.load_selected_Image(text) self.load_selected_Image(text)
else: else:
@ -3183,6 +3188,8 @@ class CustomSpinner(Spinner):
"""Method used for setting size of spinner""" """Method used for setting size of spinner"""
super(CustomSpinner, self).__init__(*args, **kwargs) super(CustomSpinner, self).__init__(*args, **kwargs)
self.dropdown_cls.max_height = Window.size[1] / 3 self.dropdown_cls.max_height = Window.size[1] / 3
self.values = list(addr for addr in BMConfigParser().addresses()
if BMConfigParser().get(str(addr), 'enabled') == 'true')
class Allmails(Screen): class Allmails(Screen):

View File

@ -41,7 +41,7 @@ requirements =
android, android,
openssl, openssl,
sqlite3, sqlite3,
kivy, kivy==1.11.1,
pyjnius==1.2.1, pyjnius==1.2.1,
libiconv, libiconv,
libzbar, libzbar,