removed useless functions from mock files
|
@ -1,4 +1,3 @@
|
||||||
from turtle import pd
|
|
||||||
from bitmessagekivy.get_platform import platform
|
from bitmessagekivy.get_platform import platform
|
||||||
from bitmessagekivy import kivy_helper_search
|
from bitmessagekivy import kivy_helper_search
|
||||||
from helper_sql import sqlExecute
|
from helper_sql import sqlExecute
|
||||||
|
|
|
@ -142,6 +142,7 @@ class MyAddress(Screen):
|
||||||
# @staticmethod
|
# @staticmethod
|
||||||
def myadd_detail(self, fromaddress, label, *args):
|
def myadd_detail(self, fromaddress, label, *args):
|
||||||
"""Load myaddresses details"""
|
"""Load myaddresses details"""
|
||||||
|
import pdb;pdb.set_trace()
|
||||||
if BMConfigParser().get(fromaddress, 'enabled') == 'true':
|
if BMConfigParser().get(fromaddress, 'enabled') == 'true':
|
||||||
obj = MyaddDetailPopup()
|
obj = MyaddDetailPopup()
|
||||||
self.address_label = obj.address_label = label
|
self.address_label = obj.address_label = label
|
||||||
|
|
|
@ -51,6 +51,9 @@ import state
|
||||||
from kivymd.uix.bottomsheet import MDCustomBottomSheet
|
from kivymd.uix.bottomsheet import MDCustomBottomSheet
|
||||||
|
|
||||||
from kivy.lang import Observable
|
from kivy.lang import Observable
|
||||||
|
# import gettext
|
||||||
|
# import l10n
|
||||||
|
# import locale
|
||||||
import ast
|
import ast
|
||||||
|
|
||||||
from bitmessagekivy.baseclass.common import toast
|
from bitmessagekivy.baseclass.common import toast
|
||||||
|
@ -206,6 +209,7 @@ class NavigateApp(MDApp):
|
||||||
"""Navigation Layout of class"""
|
"""Navigation Layout of class"""
|
||||||
# pylint: disable=too-many-public-methods,inconsistent-return-statements
|
# pylint: disable=too-many-public-methods,inconsistent-return-statements
|
||||||
|
|
||||||
|
# theme_cls = ThemeManager()
|
||||||
previous_date = ObjectProperty()
|
previous_date = ObjectProperty()
|
||||||
obj_1 = ObjectProperty()
|
obj_1 = ObjectProperty()
|
||||||
variable_1 = ListProperty(addr for addr in BMConfigParser().addresses()
|
variable_1 = ListProperty(addr for addr in BMConfigParser().addresses()
|
||||||
|
@ -412,7 +416,26 @@ class NavigateApp(MDApp):
|
||||||
"""Getting Default Account Data"""
|
"""Getting Default Account Data"""
|
||||||
if self.variable_1:
|
if self.variable_1:
|
||||||
state.association = first_addr = self.variable_1[0]
|
state.association = first_addr = self.variable_1[0]
|
||||||
|
# if BMConfigParser().get(str(first_addr), 'enabled') == 'true':
|
||||||
|
# img = identiconGeneration.generate(first_addr)
|
||||||
|
# print('line...........................................426')
|
||||||
|
# self.createFolder(state.imageDir + '/default_identicon/')
|
||||||
|
# if platform == 'android':
|
||||||
|
# # android_path = os.path.expanduser
|
||||||
|
# # ("~/user/0/org.test.bitapp/files/app/")
|
||||||
|
# if not os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
|
# BMConfigParser().addresses()[0])):
|
||||||
|
# android_path = os.path.join(
|
||||||
|
# os.environ['ANDROID_PRIVATE'] + '/app/')
|
||||||
|
# img.texture.save('{1}/images/kivy/default_identicon/{0}.png'.format(
|
||||||
|
# BMConfigParser().addresses()[0], android_path))
|
||||||
|
# else:
|
||||||
|
# if not os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
|
# BMConfigParser().addresses()[0])):
|
||||||
|
# img.texture.save(state.imageDir + '/default_identicon/{}.png'.format(
|
||||||
|
# BMConfigParser().addresses()[0]))
|
||||||
|
# instance.parent.parent.parent.parent.parent.ids.top_box.children[0].texture = (
|
||||||
|
# img.texture)
|
||||||
return first_addr
|
return first_addr
|
||||||
return 'Select Address'
|
return 'Select Address'
|
||||||
|
|
||||||
|
@ -646,16 +669,14 @@ class NavigateApp(MDApp):
|
||||||
# self.root_window.children[2].children[2].children[0].ids)
|
# self.root_window.children[2].children[2].children[0].ids)
|
||||||
self.get_inbox_count()
|
self.get_inbox_count()
|
||||||
self.get_sent_count()
|
self.get_sent_count()
|
||||||
state.trash_count = 0
|
state.trash_count = str(sqlQuery(
|
||||||
# str(sqlQuery(
|
"SELECT (SELECT count(*) FROM sent"
|
||||||
# "SELECT (SELECT count(*) FROM sent"
|
" where fromaddress = '{0}' and folder = 'trash' )"
|
||||||
# " where fromaddress = '{0}' and folder = 'trash' )"
|
"+(SELECT count(*) FROM inbox where toaddress = '{0}' and"
|
||||||
# "+(SELECT count(*) FROM inbox where toaddress = '{0}' and"
|
" folder = 'trash') AS SumCount".format(state.association))[0][0])
|
||||||
# " folder = 'trash') AS SumCount".format(state.association))[0][0])
|
state.draft_count = str(sqlQuery(
|
||||||
state.draft_count = 0
|
"SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and"
|
||||||
# str(sqlQuery(
|
" folder = 'draft' ;".format(state.association))[0][0])
|
||||||
# "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and"
|
|
||||||
# " folder = 'draft' ;".format(state.association))[0][0])
|
|
||||||
state.all_count = str(int(state.sent_count) + int(state.inbox_count))
|
state.all_count = str(int(state.sent_count) + int(state.inbox_count))
|
||||||
if msg_counter_objs:
|
if msg_counter_objs:
|
||||||
msg_counter_objs.send_cnt.badge_text = state.sent_count
|
msg_counter_objs.send_cnt.badge_text = state.sent_count
|
||||||
|
|
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 1007 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 870 B |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 822 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 716 B |