mpybit fixes

This commit is contained in:
lakshyacis 2020-03-18 16:21:18 +05:30
parent 6650876b57
commit c25ef395ad
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -398,11 +398,10 @@ class MyAddress(Screen):
meny = CustomTwoLineAvatarIconListItem( meny = CustomTwoLineAvatarIconListItem(
text=item['text'], secondary_text=item['secondary_text'], text=item['text'], secondary_text=item['secondary_text'],
theme_text_color='Custom' if is_enable == 'true' else 'Primary', theme_text_color='Custom' if is_enable == 'true' else 'Primary',
text_color=NavigateApp().theme_cls.primary_color, text_color=NavigateApp().theme_cls.primary_color,)
)
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 as e: except Exception:
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]
meny.add_widget(AvatarSampleWidget( meny.add_widget(AvatarSampleWidget(
source='./images/text_images/{}.png'.format( source='./images/text_images/{}.png'.format(
@ -508,7 +507,7 @@ class MyAddress(Screen):
instance.parent.parent.theme_text_color = 'Primary' instance.parent.parent.theme_text_color = 'Primary'
try: try:
instance.parent.parent.canvas.children[6].rgba = [0.5, 0.5, 0.5, 0.5] instance.parent.parent.canvas.children[6].rgba = [0.5, 0.5, 0.5, 0.5]
except Exception as e: except Exception:
instance.parent.parent.canvas.children[9].rgba = [0.5, 0.5, 0.5, 0.5] instance.parent.parent.canvas.children[9].rgba = [0.5, 0.5, 0.5, 0.5]
toast('Address disabled') toast('Address disabled')
Clock.schedule_once(self.address_permision_callback, 0) Clock.schedule_once(self.address_permision_callback, 0)
@ -520,7 +519,7 @@ class MyAddress(Screen):
instance.parent.parent.theme_text_color = 'Custom' instance.parent.parent.theme_text_color = 'Custom'
try: try:
instance.parent.parent.canvas.children[6].rgba = [0, 0, 0, 0] instance.parent.parent.canvas.children[6].rgba = [0, 0, 0, 0]
except Exception as e: except Exception:
instance.parent.parent.canvas.children[9].rgba = [0, 0, 0, 0] instance.parent.parent.canvas.children[9].rgba = [0, 0, 0, 0]
toast('Address Enabled') toast('Address Enabled')
Clock.schedule_once(self.address_permision_callback, 0) Clock.schedule_once(self.address_permision_callback, 0)
@ -1136,7 +1135,7 @@ class Sent(Screen):
self.loadSent() self.loadSent()
if state.association == state.check_sent_acc: if state.association == state.check_sent_acc:
total_sent = int(state.sent_count) + 1 total_sent = int(state.sent_count) + 1
state.sent_count = str(int(state.sent_count) +1) state.sent_count = str(int(state.sent_count) + 1)
self.set_sentCount(total_sent) self.set_sentCount(total_sent)
else: else:
total_sent = int(state.sent_count) total_sent = int(state.sent_count)
@ -1145,7 +1144,7 @@ class Sent(Screen):
self.sentDataQuery('fromaddress', '', '', 0, 1) self.sentDataQuery('fromaddress', '', '', 0, 1)
if state.association == state.check_sent_acc: if state.association == state.check_sent_acc:
total_sent = int(state.sent_count) + 1 total_sent = int(state.sent_count) + 1
state.sent_count = str(int(state.sent_count) +1) state.sent_count = str(int(state.sent_count) + 1)
self.set_sentCount(total_sent) self.set_sentCount(total_sent)
else: else:
total_sent = int(state.sent_count) total_sent = int(state.sent_count)
@ -2254,11 +2253,13 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
composer_obj.btn.text = data[0][0] composer_obj.btn.text = data[0][0]
composer_obj.txt_input.text = data[0][1] composer_obj.txt_input.text = data[0][1]
split_subject = data[0][2].split('Re:', 1) split_subject = data[0][2].split('Re:', 1)
composer_obj.subject.text = 'Re: ' +(split_subject[1] if len(split_subject)>1 else split_subject[0]) composer_obj.subject.text = 'Re: ' + (split_subject[1] if len(split_subject) > 1 else split_subject[0])
time_obj = datetime.fromtimestamp(int(data[0][4])) time_obj = datetime.fromtimestamp(int(data[0][4]))
time_tag = time_obj.strftime("%d %b %Y, %I:%M %p") time_tag = time_obj.strftime("%d %b %Y, %I:%M %p")
sender_name = BMConfigParser().get(data[0][1], 'label') sender_name = BMConfigParser().get(data[0][1], 'label')
composer_obj.body.text = '\n\n ------------------------On '+time_tag+', '+sender_name+' wrote:-----------------------\n' + data[0][3] composer_obj.body.text = (
'\n\n ------------------------On ' + time_tag + ', '
+ sender_name + ' wrote:-----------------------\n' + data[0][3])
composer_obj.body.focus = True composer_obj.body.focus = True
composer_obj.body.cursor = (0, 0) composer_obj.body.cursor = (0, 0)
state.kivyapp.root.ids.sc3.children[1].ids.rv.data = '' state.kivyapp.root.ids.sc3.children[1].ids.rv.data = ''