diff --git a/src/bitmessagekivy/main.kv b/src/bitmessagekivy/main.kv index 759bd71c..48c7d889 100644 --- a/src/bitmessagekivy/main.kv +++ b/src/bitmessagekivy/main.kv @@ -14,6 +14,7 @@ #:import MDFloatingActionButton kivymd.button.MDFloatingActionButton #:import Factory kivy.factory.Factory #:import MDScrollViewRefreshLayout kivymd.refreshlayout.MDScrollViewRefreshLayout +#:import MDSpinner kivymd.spinner.MDSpinner #:set color_button (0.784, 0.443, 0.216, 1) # brown #:set color_button_pressed (0.659, 0.522, 0.431, 1) # darker brown @@ -29,7 +30,7 @@ color: color_font : - drawer_logo: app.address_identicon() + drawer_logo: './images/drawer_logo1.png' NavigationDrawerDivider: NavigationDrawerSubheader: text: "Accounts" @@ -1204,3 +1205,17 @@ NavigationLayout: id: search_field hint_text: 'Search' on_text: app.searchQuery(self) + + +: + separator_color: 1, 1, 1, 1 + background: "White.png" + Button: + id: btn + disabled: True + background_disabled_normal: "White.png" + Image: + source: './images/loader.zip' + anim_delay: 0 + #mipmap: True + size: root.size \ No newline at end of file diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 7270514b..14ea7e8f 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -1026,10 +1026,25 @@ class NavigateApp(App): self.root_window.children[1].ids.toolbar.title = address_label state.association = text state.searcing_text = '' + LoadingPopup().open() self.root.ids.sc1.ids.ml.clear_widgets() self.root.ids.sc1.loadMessagelist(state.association) + + self.root.ids.sc4.ids.ml.clear_widgets() + self.root.ids.sc4.children[1].children[1].ids.search_field.text = '' + self.root.ids.sc4.loadSent(state.association) + + self.root.ids.sc16.clear_widgets() + self.root.ids.sc16.add_widget(Draft()) + + self.root.ids.sc5.clear_widgets() + self.root.ids.sc5.add_widget(Trash()) + + self.root.ids.sc17.clear_widgets() + self.root.ids.sc17.add_widget(Allmails()) + self.root.ids.scr_mngr.current = 'inbox' - msg_counter_objs = self.root_window.children[1].children[2].children[0].ids + msg_counter_objs = self.root_window.children[2].children[2].children[0].ids state.sent_count = str( sqlQuery( "SELECT COUNT(*) FROM sent WHERE fromaddress = '{}' and" @@ -1224,37 +1239,37 @@ class NavigateApp(App): def refreshScreen(self, instance): """Method show search button only on inbox or sent screen.""" state.searcing_text = '' - if instance.text == 'Sent': - self.root.ids.sc4.ids.ml.clear_widgets() - self.root.ids.sc4.children[1].children[1].ids.search_field.text = '' - self.root.ids.sc4.loadSent(state.association) - elif instance.text == 'Inbox': - self.root.ids.sc1.ids.ml.clear_widgets() - try: - self.root.ids.sc1.children[2].children[1].ids.search_field.text = '' - except Exception: - self.root.ids.sc1.children[1].children[1].ids.search_field.text = '' - self.root.ids.sc1.loadMessagelist(state.association) - elif instance.text == 'Draft': - self.root.ids.sc16.clear_widgets() - self.root.ids.sc16.add_widget(Draft()) - elif instance.text == 'Trash': - self.root.ids.sc5.clear_widgets() - self.root.ids.sc5.add_widget(Trash()) - elif instance.text == 'All Mails': - self.root.ids.sc17.clear_widgets() - self.root.ids.sc17.add_widget(Allmails()) - elif instance.text == 'Address Book': - self.root.ids.sc11.ids.ml.clear_widgets() - self.root.ids.sc11.children[1].children[1].ids.search_field.text = '' - self.root.ids.sc11.loadAddresslist(None, 'All', '') - elif instance.text == 'My Addresses': - self.root.ids.sc10.ids.ml.clear_widgets() - try: - self.root.ids.sc10.children[1].children[1].ids.search_field.text = '' - except Exception: - self.root.ids.sc10.children[2].children[1].ids.search_field.text = '' - self.root.ids.sc10.init_ui() + # if instance.text == 'Sent': + # self.root.ids.sc4.ids.ml.clear_widgets() + # self.root.ids.sc4.children[1].children[1].ids.search_field.text = '' + # self.root.ids.sc4.loadSent(state.association) + # elif instance.text == 'Inbox': + # self.root.ids.sc1.ids.ml.clear_widgets() + # try: + # self.root.ids.sc1.children[2].children[1].ids.search_field.text = '' + # except Exception: + # self.root.ids.sc1.children[1].children[1].ids.search_field.text = '' + # self.root.ids.sc1.loadMessagelist(state.association) + # elif instance.text == 'Draft': + # self.root.ids.sc16.clear_widgets() + # self.root.ids.sc16.add_widget(Draft()) + # elif instance.text == 'Trash': + # self.root.ids.sc5.clear_widgets() + # self.root.ids.sc5.add_widget(Trash()) + # elif instance.text == 'All Mails': + # self.root.ids.sc17.clear_widgets() + # self.root.ids.sc17.add_widget(Allmails()) + # elif instance.text == 'Address Book': + # self.root.ids.sc11.ids.ml.clear_widgets() + # self.root.ids.sc11.children[1].children[1].ids.search_field.text = '' + # self.root.ids.sc11.loadAddresslist(None, 'All', '') + # elif instance.text == 'My Addresses': + # self.root.ids.sc10.ids.ml.clear_widgets() + # try: + # self.root.ids.sc10.children[1].children[1].ids.search_field.text = '' + # except Exception: + # self.root.ids.sc10.children[2].children[1].ids.search_field.text = '' + # self.root.ids.sc10.init_ui() return def set_identicon(self, text): @@ -1262,11 +1277,6 @@ class NavigateApp(App): img = identiconGeneration.generate(text) self.root.children[2].children[0].ids.btn.children[1].texture = img.texture - @staticmethod - def address_identicon(): - """Address identicon""" - return './images/drawer_logo1.png' - def set_mail_detail_header(self): """Method is used for setting the details of the page""" toolbar_obj = self.root.ids.toolbar @@ -1966,3 +1976,14 @@ class Spam(Screen): """Spam Screen show widgets of page.""" pass + + +class LoadingPopup(Popup): + + def __init__(self, **kwargs): + super(LoadingPopup, self).__init__(**kwargs) + # call dismiss_popup in 2 seconds + Clock.schedule_once(self.dismiss_popup, 0.5) + + def dismiss_popup(self, dt): + self.dismiss() \ No newline at end of file diff --git a/src/buildozer.spec b/src/buildozer.spec index 444bf8ca..0dfeb191 100644 --- a/src/buildozer.spec +++ b/src/buildozer.spec @@ -13,7 +13,7 @@ package.domain = org.test source.dir = . # (list) Source files to include (let empty to include all the files) -source.include_exts = py,png,jpg,kv,atlas +source.include_exts = py,png,jpg,kv,atlas,gif,zip # (list) List of inclusions using pattern matching #source.include_patterns = assets/*,images/*.png diff --git a/src/images/3.zip b/src/images/3.zip new file mode 100644 index 00000000..34d555fe Binary files /dev/null and b/src/images/3.zip differ diff --git a/src/images/loader.gif b/src/images/loader.gif new file mode 100644 index 00000000..29064d57 Binary files /dev/null and b/src/images/loader.gif differ diff --git a/src/images/loader.zip b/src/images/loader.zip new file mode 100644 index 00000000..c80a3a17 Binary files /dev/null and b/src/images/loader.zip differ