diff --git a/src/bitmessagekivy/baseclass/addressbook.py b/src/bitmessagekivy/baseclass/addressbook.py index 53ec14eb..0b476d8d 100644 --- a/src/bitmessagekivy/baseclass/addressbook.py +++ b/src/bitmessagekivy/baseclass/addressbook.py @@ -1,4 +1,3 @@ -from turtle import pd from bitmessagekivy.get_platform import platform from bitmessagekivy import kivy_helper_search from helper_sql import sqlExecute diff --git a/src/bitmessagekivy/baseclass/myaddress.py b/src/bitmessagekivy/baseclass/myaddress.py index 2e84e871..0dbec7bf 100644 --- a/src/bitmessagekivy/baseclass/myaddress.py +++ b/src/bitmessagekivy/baseclass/myaddress.py @@ -142,6 +142,7 @@ class MyAddress(Screen): # @staticmethod def myadd_detail(self, fromaddress, label, *args): """Load myaddresses details""" + import pdb;pdb.set_trace() if BMConfigParser().get(fromaddress, 'enabled') == 'true': obj = MyaddDetailPopup() self.address_label = obj.address_label = label diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index b48e1c42..529e8fd9 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -51,6 +51,9 @@ import state from kivymd.uix.bottomsheet import MDCustomBottomSheet from kivy.lang import Observable +# import gettext +# import l10n +# import locale import ast from bitmessagekivy.baseclass.common import toast @@ -206,6 +209,7 @@ class NavigateApp(MDApp): """Navigation Layout of class""" # pylint: disable=too-many-public-methods,inconsistent-return-statements + # theme_cls = ThemeManager() previous_date = ObjectProperty() obj_1 = ObjectProperty() variable_1 = ListProperty(addr for addr in BMConfigParser().addresses() @@ -412,7 +416,26 @@ class NavigateApp(MDApp): """Getting Default Account Data""" if self.variable_1: 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 'Select Address' @@ -646,16 +669,14 @@ class NavigateApp(MDApp): # self.root_window.children[2].children[2].children[0].ids) self.get_inbox_count() self.get_sent_count() - state.trash_count = 0 - # str(sqlQuery( - # "SELECT (SELECT count(*) FROM sent" - # " where fromaddress = '{0}' and folder = 'trash' )" - # "+(SELECT count(*) FROM inbox where toaddress = '{0}' and" - # " folder = 'trash') AS SumCount".format(state.association))[0][0]) - state.draft_count = 0 - # str(sqlQuery( - # "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and" - # " folder = 'draft' ;".format(state.association))[0][0]) + state.trash_count = str(sqlQuery( + "SELECT (SELECT count(*) FROM sent" + " where fromaddress = '{0}' and folder = 'trash' )" + "+(SELECT count(*) FROM inbox where toaddress = '{0}' and" + " folder = 'trash') AS SumCount".format(state.association))[0][0]) + state.draft_count = str(sqlQuery( + "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)) if msg_counter_objs: msg_counter_objs.send_cnt.badge_text = state.sent_count diff --git a/src/tests/mock/images/account_multiple.png b/src/tests/mock/images/account_multiple.png deleted file mode 100644 index 11271619..00000000 Binary files a/src/tests/mock/images/account_multiple.png and /dev/null differ diff --git a/src/tests/mock/images/addressbook.png b/src/tests/mock/images/addressbook.png deleted file mode 100644 index 69424134..00000000 Binary files a/src/tests/mock/images/addressbook.png and /dev/null differ diff --git a/src/tests/mock/images/addressbookadd.png b/src/tests/mock/images/addressbookadd.png deleted file mode 100644 index 82af2f63..00000000 Binary files a/src/tests/mock/images/addressbookadd.png and /dev/null differ diff --git a/src/tests/mock/images/avatar.png b/src/tests/mock/images/avatar.png deleted file mode 100644 index b006bfa2..00000000 Binary files a/src/tests/mock/images/avatar.png and /dev/null differ diff --git a/src/tests/mock/images/back-button.png b/src/tests/mock/images/back-button.png deleted file mode 100644 index e260b08b..00000000 Binary files a/src/tests/mock/images/back-button.png and /dev/null differ diff --git a/src/tests/mock/images/bitmessage.icns b/src/tests/mock/images/bitmessage.icns deleted file mode 100644 index 5fe52d4e..00000000 Binary files a/src/tests/mock/images/bitmessage.icns and /dev/null differ diff --git a/src/tests/mock/images/blacklist.png b/src/tests/mock/images/blacklist.png deleted file mode 100644 index 820065a4..00000000 Binary files a/src/tests/mock/images/blacklist.png and /dev/null differ diff --git a/src/tests/mock/images/blue-plus-icon-12.png b/src/tests/mock/images/blue-plus-icon-12.png deleted file mode 100644 index f9007861..00000000 Binary files a/src/tests/mock/images/blue-plus-icon-12.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon-16px.png b/src/tests/mock/images/can-icon-16px.png deleted file mode 100644 index c649919f..00000000 Binary files a/src/tests/mock/images/can-icon-16px.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon-24px-green.png b/src/tests/mock/images/can-icon-24px-green.png deleted file mode 100644 index 652da9c0..00000000 Binary files a/src/tests/mock/images/can-icon-24px-green.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon-24px-red.png b/src/tests/mock/images/can-icon-24px-red.png deleted file mode 100644 index cf66fcbb..00000000 Binary files a/src/tests/mock/images/can-icon-24px-red.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon-24px-yellow.png b/src/tests/mock/images/can-icon-24px-yellow.png deleted file mode 100644 index 0a26470b..00000000 Binary files a/src/tests/mock/images/can-icon-24px-yellow.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon-24px.png b/src/tests/mock/images/can-icon-24px.png deleted file mode 100644 index 30f7313e..00000000 Binary files a/src/tests/mock/images/can-icon-24px.png and /dev/null differ diff --git a/src/tests/mock/images/can-icon.ico b/src/tests/mock/images/can-icon.ico deleted file mode 100644 index 903bf3da..00000000 Binary files a/src/tests/mock/images/can-icon.ico and /dev/null differ diff --git a/src/tests/mock/images/drawer_logo1.png b/src/tests/mock/images/drawer_logo1.png deleted file mode 100644 index 4152cc40..00000000 Binary files a/src/tests/mock/images/drawer_logo1.png and /dev/null differ diff --git a/src/tests/mock/images/greenicon.png b/src/tests/mock/images/greenicon.png deleted file mode 100644 index cedf9dc2..00000000 Binary files a/src/tests/mock/images/greenicon.png and /dev/null differ diff --git a/src/tests/mock/images/identities.png b/src/tests/mock/images/identities.png deleted file mode 100644 index a6aae040..00000000 Binary files a/src/tests/mock/images/identities.png and /dev/null differ diff --git a/src/tests/mock/images/images.png b/src/tests/mock/images/images.png deleted file mode 100644 index 7bb33861..00000000 Binary files a/src/tests/mock/images/images.png and /dev/null differ diff --git a/src/tests/mock/images/inbox.png b/src/tests/mock/images/inbox.png deleted file mode 100644 index dc6a6f75..00000000 Binary files a/src/tests/mock/images/inbox.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/1.png b/src/tests/mock/images/kivy/ngletteravatar/1.png deleted file mode 100644 index 9436c7d2..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/1.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/12.png b/src/tests/mock/images/kivy/ngletteravatar/12.png deleted file mode 100644 index de894b4a..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/12.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/14.png b/src/tests/mock/images/kivy/ngletteravatar/14.png deleted file mode 100644 index 42b692dd..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/14.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/3.png b/src/tests/mock/images/kivy/ngletteravatar/3.png deleted file mode 100644 index ad83cef2..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/3.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/5.png b/src/tests/mock/images/kivy/ngletteravatar/5.png deleted file mode 100644 index 3875aace..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/5.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/56.png b/src/tests/mock/images/kivy/ngletteravatar/56.png deleted file mode 100644 index 33f038cf..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/56.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/65.png b/src/tests/mock/images/kivy/ngletteravatar/65.png deleted file mode 100644 index fb608098..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/65.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/8.png b/src/tests/mock/images/kivy/ngletteravatar/8.png deleted file mode 100644 index dd2671e9..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/8.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/90.png b/src/tests/mock/images/kivy/ngletteravatar/90.png deleted file mode 100644 index 7d1770ab..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/90.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg b/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg deleted file mode 100644 index 8e3b1c35..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/Galleryr_rcirclelogo_Small.jpg and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/a.png b/src/tests/mock/images/kivy/ngletteravatar/a.png deleted file mode 100644 index 1c3bb8bf..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/a.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/b.png b/src/tests/mock/images/kivy/ngletteravatar/b.png deleted file mode 100644 index 462bf808..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/b.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/c.png b/src/tests/mock/images/kivy/ngletteravatar/c.png deleted file mode 100644 index 180b7edc..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/c.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/d.png b/src/tests/mock/images/kivy/ngletteravatar/d.png deleted file mode 100644 index 9e983e4d..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/d.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg b/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg deleted file mode 100644 index 7630511f..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/e.png b/src/tests/mock/images/kivy/ngletteravatar/e.png deleted file mode 100644 index 60961992..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/e.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/g.png b/src/tests/mock/images/kivy/ngletteravatar/g.png deleted file mode 100644 index 762cc6fa..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/g.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/h.png b/src/tests/mock/images/kivy/ngletteravatar/h.png deleted file mode 100644 index 8f752952..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/h.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/i.png b/src/tests/mock/images/kivy/ngletteravatar/i.png deleted file mode 100644 index a89710ef..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/i.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/j.png b/src/tests/mock/images/kivy/ngletteravatar/j.png deleted file mode 100644 index 926de34c..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/j.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/k.png b/src/tests/mock/images/kivy/ngletteravatar/k.png deleted file mode 100644 index 77da163e..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/k.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/l.png b/src/tests/mock/images/kivy/ngletteravatar/l.png deleted file mode 100644 index e6112f2a..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/l.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/m.png b/src/tests/mock/images/kivy/ngletteravatar/m.png deleted file mode 100644 index c93554a1..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/m.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/n.png b/src/tests/mock/images/kivy/ngletteravatar/n.png deleted file mode 100644 index 8158a1e4..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/n.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/o.png b/src/tests/mock/images/kivy/ngletteravatar/o.png deleted file mode 100644 index 729a82a6..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/o.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/p.png b/src/tests/mock/images/kivy/ngletteravatar/p.png deleted file mode 100644 index b3adb0ce..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/p.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/r.png b/src/tests/mock/images/kivy/ngletteravatar/r.png deleted file mode 100644 index 1b64b8ee..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/r.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/s.png b/src/tests/mock/images/kivy/ngletteravatar/s.png deleted file mode 100644 index 8813d11a..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/s.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/t.jpg b/src/tests/mock/images/kivy/ngletteravatar/t.jpg deleted file mode 100644 index 20932aad..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/t.jpg and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/u.png b/src/tests/mock/images/kivy/ngletteravatar/u.png deleted file mode 100644 index 6af53add..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/u.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/v.png b/src/tests/mock/images/kivy/ngletteravatar/v.png deleted file mode 100644 index aaaf191e..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/v.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/w.png b/src/tests/mock/images/kivy/ngletteravatar/w.png deleted file mode 100644 index 20ff7ed9..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/w.png and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/x.jpg b/src/tests/mock/images/kivy/ngletteravatar/x.jpg deleted file mode 100644 index 107f1732..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/x.jpg and /dev/null differ diff --git a/src/tests/mock/images/kivy/ngletteravatar/z.png b/src/tests/mock/images/kivy/ngletteravatar/z.png deleted file mode 100644 index efcda8fe..00000000 Binary files a/src/tests/mock/images/kivy/ngletteravatar/z.png and /dev/null differ diff --git a/src/tests/mock/images/kivymd_logo.png b/src/tests/mock/images/kivymd_logo.png deleted file mode 100644 index ce39b0d4..00000000 Binary files a/src/tests/mock/images/kivymd_logo.png and /dev/null differ diff --git a/src/tests/mock/images/me.jpg b/src/tests/mock/images/me.jpg deleted file mode 100644 index f54c791f..00000000 Binary files a/src/tests/mock/images/me.jpg and /dev/null differ diff --git a/src/tests/mock/images/networkstatus.png b/src/tests/mock/images/networkstatus.png deleted file mode 100644 index b702ee85..00000000 Binary files a/src/tests/mock/images/networkstatus.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/1.png b/src/tests/mock/images/ngletteravatar/1.png deleted file mode 100644 index 9436c7d2..00000000 Binary files a/src/tests/mock/images/ngletteravatar/1.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/12.png b/src/tests/mock/images/ngletteravatar/12.png deleted file mode 100644 index de894b4a..00000000 Binary files a/src/tests/mock/images/ngletteravatar/12.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/14.png b/src/tests/mock/images/ngletteravatar/14.png deleted file mode 100644 index 42b692dd..00000000 Binary files a/src/tests/mock/images/ngletteravatar/14.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/3.png b/src/tests/mock/images/ngletteravatar/3.png deleted file mode 100644 index ad83cef2..00000000 Binary files a/src/tests/mock/images/ngletteravatar/3.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/5.png b/src/tests/mock/images/ngletteravatar/5.png deleted file mode 100644 index 3875aace..00000000 Binary files a/src/tests/mock/images/ngletteravatar/5.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/56.png b/src/tests/mock/images/ngletteravatar/56.png deleted file mode 100644 index 33f038cf..00000000 Binary files a/src/tests/mock/images/ngletteravatar/56.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/65.png b/src/tests/mock/images/ngletteravatar/65.png deleted file mode 100644 index fb608098..00000000 Binary files a/src/tests/mock/images/ngletteravatar/65.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/8.png b/src/tests/mock/images/ngletteravatar/8.png deleted file mode 100644 index dd2671e9..00000000 Binary files a/src/tests/mock/images/ngletteravatar/8.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/90.png b/src/tests/mock/images/ngletteravatar/90.png deleted file mode 100644 index 7d1770ab..00000000 Binary files a/src/tests/mock/images/ngletteravatar/90.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg b/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg deleted file mode 100644 index 8e3b1c35..00000000 Binary files a/src/tests/mock/images/ngletteravatar/Galleryr_rcirclelogo_Small.jpg and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/a.png b/src/tests/mock/images/ngletteravatar/a.png deleted file mode 100644 index 1c3bb8bf..00000000 Binary files a/src/tests/mock/images/ngletteravatar/a.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/b.png b/src/tests/mock/images/ngletteravatar/b.png deleted file mode 100644 index 462bf808..00000000 Binary files a/src/tests/mock/images/ngletteravatar/b.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/c.png b/src/tests/mock/images/ngletteravatar/c.png deleted file mode 100644 index 180b7edc..00000000 Binary files a/src/tests/mock/images/ngletteravatar/c.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/d.png b/src/tests/mock/images/ngletteravatar/d.png deleted file mode 100644 index 9e983e4d..00000000 Binary files a/src/tests/mock/images/ngletteravatar/d.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg b/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg deleted file mode 100644 index 7630511f..00000000 Binary files a/src/tests/mock/images/ngletteravatar/depositphotos_142729281-stock-illustration-letter-l-sign-design-template.jpg and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/e.png b/src/tests/mock/images/ngletteravatar/e.png deleted file mode 100644 index 60961992..00000000 Binary files a/src/tests/mock/images/ngletteravatar/e.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/g.png b/src/tests/mock/images/ngletteravatar/g.png deleted file mode 100644 index 762cc6fa..00000000 Binary files a/src/tests/mock/images/ngletteravatar/g.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/h.png b/src/tests/mock/images/ngletteravatar/h.png deleted file mode 100644 index 8f752952..00000000 Binary files a/src/tests/mock/images/ngletteravatar/h.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/i.png b/src/tests/mock/images/ngletteravatar/i.png deleted file mode 100644 index a89710ef..00000000 Binary files a/src/tests/mock/images/ngletteravatar/i.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/j.png b/src/tests/mock/images/ngletteravatar/j.png deleted file mode 100644 index 926de34c..00000000 Binary files a/src/tests/mock/images/ngletteravatar/j.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/k.png b/src/tests/mock/images/ngletteravatar/k.png deleted file mode 100644 index 77da163e..00000000 Binary files a/src/tests/mock/images/ngletteravatar/k.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/l.png b/src/tests/mock/images/ngletteravatar/l.png deleted file mode 100644 index e6112f2a..00000000 Binary files a/src/tests/mock/images/ngletteravatar/l.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/m.png b/src/tests/mock/images/ngletteravatar/m.png deleted file mode 100644 index c93554a1..00000000 Binary files a/src/tests/mock/images/ngletteravatar/m.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/n.png b/src/tests/mock/images/ngletteravatar/n.png deleted file mode 100644 index 8158a1e4..00000000 Binary files a/src/tests/mock/images/ngletteravatar/n.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/o.png b/src/tests/mock/images/ngletteravatar/o.png deleted file mode 100644 index 729a82a6..00000000 Binary files a/src/tests/mock/images/ngletteravatar/o.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/p.png b/src/tests/mock/images/ngletteravatar/p.png deleted file mode 100644 index b3adb0ce..00000000 Binary files a/src/tests/mock/images/ngletteravatar/p.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/r.png b/src/tests/mock/images/ngletteravatar/r.png deleted file mode 100644 index 1b64b8ee..00000000 Binary files a/src/tests/mock/images/ngletteravatar/r.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/s.png b/src/tests/mock/images/ngletteravatar/s.png deleted file mode 100644 index 8813d11a..00000000 Binary files a/src/tests/mock/images/ngletteravatar/s.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/t.jpg b/src/tests/mock/images/ngletteravatar/t.jpg deleted file mode 100644 index 20932aad..00000000 Binary files a/src/tests/mock/images/ngletteravatar/t.jpg and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/u.png b/src/tests/mock/images/ngletteravatar/u.png deleted file mode 100644 index 6af53add..00000000 Binary files a/src/tests/mock/images/ngletteravatar/u.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/v.png b/src/tests/mock/images/ngletteravatar/v.png deleted file mode 100644 index aaaf191e..00000000 Binary files a/src/tests/mock/images/ngletteravatar/v.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/w.png b/src/tests/mock/images/ngletteravatar/w.png deleted file mode 100644 index 20ff7ed9..00000000 Binary files a/src/tests/mock/images/ngletteravatar/w.png and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/x.jpg b/src/tests/mock/images/ngletteravatar/x.jpg deleted file mode 100644 index 107f1732..00000000 Binary files a/src/tests/mock/images/ngletteravatar/x.jpg and /dev/null differ diff --git a/src/tests/mock/images/ngletteravatar/z.png b/src/tests/mock/images/ngletteravatar/z.png deleted file mode 100644 index efcda8fe..00000000 Binary files a/src/tests/mock/images/ngletteravatar/z.png and /dev/null differ diff --git a/src/tests/mock/images/plus-4-xxl.png b/src/tests/mock/images/plus-4-xxl.png deleted file mode 100644 index 1f178267..00000000 Binary files a/src/tests/mock/images/plus-4-xxl.png and /dev/null differ diff --git a/src/tests/mock/images/plus.png b/src/tests/mock/images/plus.png deleted file mode 100644 index 4fd3478c..00000000 Binary files a/src/tests/mock/images/plus.png and /dev/null differ diff --git a/src/tests/mock/images/qidenticon.png b/src/tests/mock/images/qidenticon.png deleted file mode 100644 index 21abec78..00000000 Binary files a/src/tests/mock/images/qidenticon.png and /dev/null differ diff --git a/src/tests/mock/images/qidenticon_two.png b/src/tests/mock/images/qidenticon_two.png deleted file mode 100644 index 35180659..00000000 Binary files a/src/tests/mock/images/qidenticon_two.png and /dev/null differ diff --git a/src/tests/mock/images/qidenticon_two_x.png b/src/tests/mock/images/qidenticon_two_x.png deleted file mode 100644 index a4851205..00000000 Binary files a/src/tests/mock/images/qidenticon_two_x.png and /dev/null differ diff --git a/src/tests/mock/images/qidenticon_x.png b/src/tests/mock/images/qidenticon_x.png deleted file mode 100644 index 07e903e5..00000000 Binary files a/src/tests/mock/images/qidenticon_x.png and /dev/null differ diff --git a/src/tests/mock/images/redicon.png b/src/tests/mock/images/redicon.png deleted file mode 100644 index dfc84b47..00000000 Binary files a/src/tests/mock/images/redicon.png and /dev/null differ diff --git a/src/tests/mock/images/send.png b/src/tests/mock/images/send.png deleted file mode 100644 index 6a7c8302..00000000 Binary files a/src/tests/mock/images/send.png and /dev/null differ diff --git a/src/tests/mock/images/sent.png b/src/tests/mock/images/sent.png deleted file mode 100644 index 01b5f0dd..00000000 Binary files a/src/tests/mock/images/sent.png and /dev/null differ diff --git a/src/tests/mock/images/subscriptions.png b/src/tests/mock/images/subscriptions.png deleted file mode 100644 index e4561208..00000000 Binary files a/src/tests/mock/images/subscriptions.png and /dev/null differ diff --git a/src/tests/mock/images/yellowicon.png b/src/tests/mock/images/yellowicon.png deleted file mode 100644 index 95e451d5..00000000 Binary files a/src/tests/mock/images/yellowicon.png and /dev/null differ diff --git a/src/tests/mock/pybitmessage/baseclass/common.py b/src/tests/mock/pybitmessage/baseclass/common.py index 415a90d0..7ad740f5 100644 --- a/src/tests/mock/pybitmessage/baseclass/common.py +++ b/src/tests/mock/pybitmessage/baseclass/common.py @@ -73,17 +73,6 @@ def avatarImageFirstLetter(letter_string): return img_latter if img_latter else '!' -def AddTimeWidget(time): # pylint: disable=redefined-outer-name, W0201 - """This method is used to create TimeWidget""" - action_time = TimeTagRightSampleWidget( - text=str(ShowTimeHistoy(time)), - font_style="Caption", - size=[120, 140] if platform == "android" else [64, 80], - ) - action_time.font_size = "11sp" - return action_time - - def ShowTimeHistoy(act_time): """This method is used to return the message sent or receive time""" action_time = datetime.fromtimestamp(int(act_time)) diff --git a/src/tests/mock/pybitmessage/baseclass/draft.py b/src/tests/mock/pybitmessage/baseclass/draft.py index c4ab0175..8de9777f 100644 --- a/src/tests/mock/pybitmessage/baseclass/draft.py +++ b/src/tests/mock/pybitmessage/baseclass/draft.py @@ -49,9 +49,6 @@ class Draft(Screen): self.account = state.association xAddress = 'fromaddress' self.ids.tag_label.text = '' - self.draftDataQuery(xAddress, where, what) - # if state.msg_counter_objs: - # state.msg_counter_objs.draft_cnt.children[0].children[0].text = showLimitedCnt(len(self.queryreturn)) if self.queryreturn: self.ids.tag_label.text = 'Draft' self.set_draftCnt(state.draft_count) @@ -68,10 +65,6 @@ class Draft(Screen): valign='top') self.ids.ml.add_widget(content) - def draftDataQuery(self, xAddress, where, what, start_indx=0, end_indx=20): - """This methosd is for retrieving draft messages""" - self.queryreturn = [] - def set_draftCnt(self, Count): # pylint: disable=no-self-use """This method set the count of draft mails""" draftCnt_obj = state.kivyapp.root.ids.content_drawer.ids.draft_cnt @@ -112,12 +105,6 @@ class Draft(Screen): if self.ids.scroll_y.scroll_y <= -0.0 and self.has_refreshed: self.ids.scroll_y.scroll_y = 0.06 total_draft_msg = len(self.ids.ml.children) - self.update_draft_screen_on_scroll(total_draft_msg) - - def update_draft_screen_on_scroll(self, total_draft_msg, where='', what=''): - """Load more data on scroll down""" - self.draftDataQuery('fromaddress', where, what, total_draft_msg, 5) - self.set_mdList() def draft_detail(self, ackdata, instance, *args): """Show draft Details""" diff --git a/src/tests/mock/pybitmessage/baseclass/inbox.py b/src/tests/mock/pybitmessage/baseclass/inbox.py index 6ca4d14f..cd3a32e6 100644 --- a/src/tests/mock/pybitmessage/baseclass/inbox.py +++ b/src/tests/mock/pybitmessage/baseclass/inbox.py @@ -75,4 +75,3 @@ class Inbox(Screen): if self.ids.scroll_y.scroll_y <= -0.0 and self.has_refreshed: self.ids.scroll_y.scroll_y = 0.06 total_message = len(self.ids.ml.children) - diff --git a/src/tests/mock/pybitmessage/baseclass/maildetail.py b/src/tests/mock/pybitmessage/baseclass/maildetail.py index acf6f5b6..23afd949 100644 --- a/src/tests/mock/pybitmessage/baseclass/maildetail.py +++ b/src/tests/mock/pybitmessage/baseclass/maildetail.py @@ -179,9 +179,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes def inbox_reply(self): """Reply inbox messages""" state.in_composer = True - data = sqlQuery( - "select toaddress, fromaddress, subject, message, received from inbox where" - " msgid = ?;", state.mail_id) + data = [] composer_obj = self.parent.screens[1].children[1].ids composer_obj.ti.text = data[0][0] composer_obj.btn.text = data[0][0] @@ -203,9 +201,7 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes def write_msg(self, navApp): """Write on draft mail""" state.send_draft_mail = state.mail_id - data = sqlQuery( - "select toaddress, fromaddress, subject, message from sent where" - " ackdata = ?;", state.mail_id) + data = [] composer_ids = ( self.parent.parent.ids.sc3.children[1].ids) composer_ids.ti.text = data[0][1] diff --git a/src/tests/mock/pybitmessage/baseclass/myaddress.py b/src/tests/mock/pybitmessage/baseclass/myaddress.py index 03a98669..77709346 100644 --- a/src/tests/mock/pybitmessage/baseclass/myaddress.py +++ b/src/tests/mock/pybitmessage/baseclass/myaddress.py @@ -128,18 +128,7 @@ class MyAddress(Screen): """Load data on scroll down""" if self.ids.refresh_layout.scroll_y <= -0.0 and self.has_refreshed: self.ids.refresh_layout.scroll_y = 0.06 - my_addresses = len(self.ids.ml.children) - if my_addresses != len(self.addresses_list): - self.update_addressBook_on_scroll(my_addresses) - self.has_refreshed = ( - True if my_addresses != len(self.addresses_list) else False - ) - def update_addressBook_on_scroll(self, my_addresses): - """Loads more data on scroll down""" - self.set_mdList(my_addresses, my_addresses + 20) - - @staticmethod def myadd_detail(self, fromaddress, label, *args): """Load myaddresses details""" if BMConfigParser().get(fromaddress, 'enabled') == 'true': diff --git a/src/tests/mock/pybitmessage/baseclass/network.py b/src/tests/mock/pybitmessage/baseclass/network.py index a8237c07..457293cf 100644 --- a/src/tests/mock/pybitmessage/baseclass/network.py +++ b/src/tests/mock/pybitmessage/baseclass/network.py @@ -4,6 +4,7 @@ from kivy.clock import Clock from kivy.properties import StringProperty from kivy.uix.screenmanager import Screen + class NetworkStat(Screen): """NetworkStat class for kivy Ui""" @@ -26,14 +27,3 @@ class NetworkStat(Screen): def init_ui(self, dt=0): """Clock Schdule for method networkstat screen""" pass - # self.text_variable_1 = '{0} :: {1}'.format( - # 'Total Connections', str(len(stats.connectedHostsList()))) - # self.text_variable_2 = 'Processed {0} per-to-per messages'.format( - # str(state.numberOfMessagesProcessed)) - # self.text_variable_3 = 'Processed {0} brodcast messages'.format( - # str(state.numberOfBroadcastsProcessed)) - # self.text_variable_4 = 'Processed {0} public keys'.format( - # str(state.numberOfPubkeysProcessed)) - # self.text_variable_5 = '{0} object to be synced'.format( - # len(objectracker.missingObjects)) - diff --git a/src/tests/mock/pybitmessage/baseclass/payment.py b/src/tests/mock/pybitmessage/baseclass/payment.py index bc3de6e8..411cdde2 100644 --- a/src/tests/mock/pybitmessage/baseclass/payment.py +++ b/src/tests/mock/pybitmessage/baseclass/payment.py @@ -21,35 +21,10 @@ from pybitmessage import state class Payment(Screen): """Payment Screen class for kivy Ui""" - def get_free_credits(self, instance): - """Get the available credits""" - # pylint: disable=no-self-use - state.availabe_credit = instance.parent.children[1].text - existing_credits = state.kivyapp.root.ids.sc18.ids.cred.text - if float(existing_credits.split()[1]) > 0: - toast( - 'We already have added free coins' - ' for the subscription to your account!') - else: - toast('Coins added to your account!') - state.kivyapp.root.ids.sc18.ids.cred.text = '{0}'.format( - state.availabe_credit) - @staticmethod def create_hidden_payment_address(): """This is basically used for creating hidden address used in payment for purchasing credits""" - # if BMConfigParser().paymentaddress(): - # toast('hidden payment address already exist for buying subscription...') - # else: - # streamNumberForAddress = 1 - # eighteenByteRipe = False - # nonceTrialsPerByte = 1000 - # payloadLengthExtraBytes = 1000 - # queues.addressGeneratorQueue.put(( - # 'createPaymentAddress', 4, streamNumberForAddress, '', 1, - # "", eighteenByteRipe, nonceTrialsPerByte, - # payloadLengthExtraBytes)) - # toast('hidden payment address Creating for buying subscription....') + pass class Category(BoxLayout, RectangularElevationBehavior): diff --git a/src/tests/mock/pybitmessage/baseclass/popup.py b/src/tests/mock/pybitmessage/baseclass/popup.py index ec9ed872..a933d113 100644 --- a/src/tests/mock/pybitmessage/baseclass/popup.py +++ b/src/tests/mock/pybitmessage/baseclass/popup.py @@ -48,34 +48,6 @@ class GrashofPopup(BoxLayout): def _onSuccess(self, addressVersion, streamNumber, ripe): pass - def addressChanged(self, addr): - """Address validation callback, performs validation and gives feedback""" - status, addressVersion, streamNumber, ripe = decodeAddress( - str(addr)) - self.valid = status == 'success' - if self.valid: - text = "Address is valid." - self._onSuccess(addressVersion, streamNumber, ripe) - elif status == 'missingbm': - text = "The address should start with ''BM-''" - elif status == 'checksumfailed': - text = ( - "The address is not typed or copied correctly" - ) - elif status == 'versiontoohigh': - text = ( - "The version number of this address is higher than this" - " software can support. Please upgrade Bitmessage.") - elif status == 'invalidcharacters': - text = "The address contains invalid characters." - elif status == 'ripetooshort': - text = "Some data encoded in the address is too short." - elif status == 'ripetoolong': - text = "Some data encoded in the address is too long." - elif status == 'varintmalformed': - text = "Some data encoded in the address is malformed." - return text - class AddbookDetailPopup(BoxLayout): """AddbookDetailPopup class for kivy Ui""" diff --git a/src/tests/mock/pybitmessage/baseclass/scan_screen.py b/src/tests/mock/pybitmessage/baseclass/scan_screen.py index 142ae73f..12518e08 100644 --- a/src/tests/mock/pybitmessage/baseclass/scan_screen.py +++ b/src/tests/mock/pybitmessage/baseclass/scan_screen.py @@ -12,29 +12,6 @@ from kivy.properties import ( from kivy.uix.screenmanager import Screen -# if platform != "android": -# from kivy.config import Config -# from kivy_garden.zbarcam import ZBarCam -# from pyzbar.pyzbar import ZBarSymbol - -# Config.set("input", "mouse", "mouse, multitouch_on_demand") -# elif platform == "android": -# from jnius import autoclass, cast -# from android.runnable import run_on_ui_thread -# from android import python_act as PythonActivity - -# Toast = autoclass("android.widget.Toast") -# String = autoclass("java.lang.String") -# CharSequence = autoclass("java.lang.CharSequence") -# context = PythonActivity.mActivity - -# @run_on_ui_thread -# def show_toast(text, length): -# """Its showing toast on screen""" -# t = Toast.makeText(context, text, length) -# t.show() - - class ScanScreen(Screen): """ScanScreen is for scaning Qr code""" # pylint: disable=unused-argument diff --git a/src/tests/mock/pybitmessage/baseclass/sent.py b/src/tests/mock/pybitmessage/baseclass/sent.py index b1b7d280..6feae309 100644 --- a/src/tests/mock/pybitmessage/baseclass/sent.py +++ b/src/tests/mock/pybitmessage/baseclass/sent.py @@ -130,22 +130,6 @@ class Sent(Screen): if self.ids.scroll_y.scroll_y <= -0.0 and self.has_refreshed: self.ids.scroll_y.scroll_y = 0.06 total_sent_msg = len(self.ids.ml.children) - self.update_sent_screen_on_scroll(total_sent_msg) - - def update_sent_screen_on_scroll(self, total_sent_msg, where="", what=""): - """This method is used to load more data on scroll down""" - if state.searcing_text: - where = ['subject', 'message'] - what = state.searcing_text - data = [] - for mail in self.queryreturn: - data.append({ - 'text': mail[1].strip(), - 'secondary_text': mail[2][:50] + '........' if len( - mail[2]) >= 50 else (mail[2] + ',' + mail[3].replace( - '\n', ''))[0:50] + '........', - 'ackdata': mail[5], 'senttime': mail[6]}) - self.set_mdlist(data, 0) @staticmethod def set_sentCount(total_sent): @@ -188,17 +172,3 @@ class Sent(Screen): self.ids.tag_label.text = '' self.ids.ml.remove_widget(instance.parent.parent) toast('Deleted') - - def archive(self, data_index, instance, *args): - """Archive sent mail from sent mail listing""" - self.ids.ml.remove_widget(instance.parent.parent) - self.update_trash() - - def update_trash(self): - """Update trash screen mails which is deleted from inbox""" - try: - self.parent.screens[3].clear_widgets() - self.parent.screens[3].add_widget(Factory.Trash()) - except Exception: - self.parent.parent.screens[3].clear_widgets() - self.parent.parent.screens[3].add_widget(Factory.Trash()) diff --git a/src/tests/mock/pybitmessage/baseclass/settings.py b/src/tests/mock/pybitmessage/baseclass/settings.py index 610b0071..d63884b2 100644 --- a/src/tests/mock/pybitmessage/baseclass/settings.py +++ b/src/tests/mock/pybitmessage/baseclass/settings.py @@ -1,91 +1,6 @@ from kivy.uix.screenmanager import Screen -from kivy.uix.checkbox import CheckBox + class Setting(Screen): """Setting Screen for kivy Ui""" - # exp_text = "By default, if you send a message to someone and he is offline for more than two days, Bitmessage will\ - # send the message again after an additional two days. This will be continued with exponential backoff\ - # forever; messages will be resent after 5, 10, 20 days ect. until the receiver acknowledges them.\ - # Here you may change that behavior by having Bitmessage give up after a certain number of days \ - # or months." - - # languages = { - # 'ar': 'Arabic', - # 'cs': 'Czech', - # 'da': 'Danish', - # 'de': 'German', - # 'en': 'English', - # 'eo': 'Esperanto', - # 'fr': 'French', - # 'it': 'Italian', - # 'ja': 'Japanese', - # 'nl': 'Dutch', - # 'no': 'Norwegian', - # 'pl': 'Polish', - # 'pt': 'Portuguese', - # 'ru': 'Russian', - # 'sk': 'Slovak', - # 'zh': 'Chinese', - # } - # newlocale = None - - # def __init__(self, *args, **kwargs): - # """Trash method, delete sent message and add in Trash""" - # super(Setting, self).__init__(*args, **kwargs) - # if self.newlocale is None: - # self.newlocale = l10n.getTranslationLanguage() - # lang = locale.normalize(l10n.getTranslationLanguage()) - # langs = [ - # lang.split(".")[0] + "." + l10n.encoding, - # lang.split(".")[0] + "." + 'UTF-8', - # lang - # ] - # if 'win32' in platform or 'win64' in platform: - # langs = [l10n.getWindowsLocale(lang)] - # for lang in langs: - # try: - # l10n.setlocale(locale.LC_ALL, lang) - # if 'win32' not in platform and 'win64' not in platform: - # l10n.encoding = locale.nl_langinfo(locale.CODESET) - # else: - # l10n.encoding = locale.getlocale()[1] - # logger.info("Successfully set locale to %s", lang) - # break - # except: - # logger.error("Failed to set locale to %s", lang, exc_info=True) - - # Clock.schedule_once(self.init_ui, 0) - - # def init_ui(self, dt=0): - # """Initialization for Ui""" - # if self.newlocale is None: - # self.newlocale = l10n.getTranslationLanguage() - # # state.kivyapp.tr = Lang(self.newlocale) - # state.kivyapp.tr = Lang(self.newlocale) - # menu_items = [{"text": f"{i}"} for i in self.languages.values()] - # self.menu = MDDropdownMenu( - # caller=self.ids.dropdown_item, - # items=menu_items, - # position="auto", - # width_mult=3.5, - # ) - # self.menu.bind(on_release=self.set_item) - - # def set_item(self, instance_menu, instance_menu_item): - # self.ids.dropdown_item.set_item(instance_menu_item.text) - # instance_menu.dismiss() - - # def change_language(self): - # lang = self.ids.dropdown_item.current_item - # for k, v in self.languages.items(): - # if v == lang: - # BMConfigParser().set('bitmessagesettings', 'userlocale', k) - # BMConfigParser().save() - # state.kivyapp.tr = Lang(k) - # self.children[0].active = True - # Clock.schedule_once(partial(self.language_callback, k), 1) - - # def language_callback(self, lang, dt=0): - # self.children[0].active = False - # state.kivyapp.tr = Lang(lang) - # toast('Language changed') + pass diff --git a/src/tests/mock/pybitmessage/baseclass/trash.py b/src/tests/mock/pybitmessage/baseclass/trash.py index 5bf58509..f082e891 100644 --- a/src/tests/mock/pybitmessage/baseclass/trash.py +++ b/src/tests/mock/pybitmessage/baseclass/trash.py @@ -38,7 +38,6 @@ class Trash(Screen): if state.kivyapp.variable_1: state.association = state.kivyapp.variable_1[0] self.ids.tag_label.text = '' - # self.trashDataQuery(0, 20) if len(self.trash_messages): self.ids.ml.clear_widgets() self.ids.tag_label.text = 'Trash' @@ -58,10 +57,6 @@ class Trash(Screen): valign='top') self.ids.ml.add_widget(content) - def trashDataQuery(self, start_indx, end_indx): - """Trash message query""" - self.trash_messages = [] - def set_TrashCnt(self, Count): # pylint: disable=no-self-use """This method is used to set trash message count""" trashCnt_obj = state.kivyapp.root.ids.content_drawer.ids.trash_cnt @@ -70,26 +65,6 @@ class Trash(Screen): def set_mdList(self): """This method is used to create the mdlist""" total_trash_msg = len(self.ids.ml.children) - for item in self.trash_messages: - subject = item[2].decode() if isinstance(item[2], bytes) else item[2] - body = item[3].decode() if isinstance(item[3], bytes) else item[3] - message_row = CutsomSwipeToDeleteItem( - text=item[1], - ) - message_row.bind(on_swipe_complete=partial(self.on_swipe_complete, message_row)) - listItem = message_row.ids.content - listItem.secondary_text = (item[2][:50] + '........' if len( - subject) >= 50 else (subject + ',' + body)[0:50] + '........').replace('\t', '').replace(' ', '') - listItem.theme_text_color = "Custom" - listItem.text_color = ThemeClsColor - img_latter = state.imageDir + '/text_images/{}.png'.format( - avatarImageFirstLetter(subject[0].strip())) - message_row.ids.avater_img.source = img_latter - message_row.ids.time_tag.text = str(ShowTimeHistoy(item[7])) - message_row.ids.chip_tag.text = 'inbox 'if 'inbox' in item[4] else 'sent' - message_row.ids.delete_msg.bind(on_press=partial( - self.delete_permanently, item[5], item[4])) - self.ids.ml.add_widget(message_row) self.has_refreshed = True if total_trash_msg != len( self.ids.ml.children) else False @@ -102,55 +77,3 @@ class Trash(Screen): if self.ids.scroll_y.scroll_y <= -0.0 and self.has_refreshed: self.ids.scroll_y.scroll_y = 0.06 total_trash_msg = len(self.ids.ml.children) - self.update_trash_screen_on_scroll(total_trash_msg) - - def update_trash_screen_on_scroll(self, total_trash_msg): - """Load more data on scroll down""" - # self.trashDataQuery(total_trash_msg, 5) - self.set_mdList() - - def delete_permanently(self, data_index, folder, instance, *args): - """Deleting trash mail permanently""" - self.table_name = folder.split(',')[1] - self.delete_index = data_index - self.delete_confirmation() - - def callback_for_screen_load(self, dt=0): - """This methos is for loading screen""" - self.ids.ml.clear_widgets() - self.init_ui(0) - self.children[1].active = False - toast('Message is permanently deleted') - - def delete_confirmation(self): - """Show confirmation delete popup""" - width = .8 if platform == 'android' else .55 - dialog_box = MDDialog( - text='Are you sure you want to delete this' - ' message permanently from trash?', - size_hint=(width, .25), - buttons=[ - MDFlatButton( - text="Yes", on_release=lambda x: callback_for_delete_msg("Yes") - ), - MDFlatButton( - text="No", on_release=lambda x: callback_for_delete_msg("No"), - ), - ],) - dialog_box.open() - - def callback_for_delete_msg(text_item, *arg): - """Getting the callback of alert box""" - if text_item == 'Yes': - self.delete_message_from_trash() - else: - toast(text_item) - dialog_box.dismiss() - - def delete_message_from_trash(self): - """Deleting message from trash""" - self.children[1].active = True - if int(state.trash_count) > 0: - self.set_TrashCnt(int(state.trash_count) - 1) - state.trash_count = str(int(state.trash_count) - 1) - Clock.schedule_once(self.callback_for_screen_load, 1) diff --git a/src/tests/mock/pybitmessage/kv/maildetail.kv b/src/tests/mock/pybitmessage/kv/maildetail.kv index e98b8661..6adf86aa 100644 --- a/src/tests/mock/pybitmessage/kv/maildetail.kv +++ b/src/tests/mock/pybitmessage/kv/maildetail.kv @@ -5,18 +5,8 @@ BoxLayout: size_hint_y: None orientation: 'vertical' - # height: dp(bod.height) + self.minimum_height height: self.minimum_height padding: dp(10) - # MDLabel: - # size_hint_y: None - # id: subj - # text: root.subject - # theme_text_color: 'Primary' - # halign: 'left' - # font_style: 'H5' - # height: dp(40) - # on_touch_down: root.allclick(self) OneLineListTitle: id: subj text: app.tr._(root.subject)