diff --git a/src/bitmessagekivy/main.kv b/src/bitmessagekivy/main.kv index 81586f2f..1c2e3c6a 100644 --- a/src/bitmessagekivy/main.kv +++ b/src/bitmessagekivy/main.kv @@ -15,6 +15,7 @@ #:import Factory kivy.factory.Factory #:import MDScrollViewRefreshLayout kivymd.refreshlayout.MDScrollViewRefreshLayout #:import MDSpinner kivymd.spinner.MDSpinner +#:import NoTransition kivy.uix.screenmanager.NoTransition #:set color_button (0.784, 0.443, 0.216, 1) # brown #:set color_button_pressed (0.659, 0.522, 0.431, 1) # darker brown @@ -58,6 +59,7 @@ text: "Inbox" on_release: app.root.ids.scr_mngr.current = 'inbox' badge_text: "0" + on_press: app.load_screen(self) NavigationDrawerIconButton: id: send_cnt icon: 'send' @@ -70,21 +72,21 @@ text: "Draft" on_release: app.root.ids.scr_mngr.current = 'draft' badge_text: "0" - NavigationDrawerIconButton: - text: "Starred" - icon:'star' - on_release: app.root.ids.scr_mngr.current = 'starred' - badge_text: "0" - NavigationDrawerIconButton: - icon: 'archive' - text: "Archieve" - on_release: app.root.ids.scr_mngr.current = 'archieve' - badge_text: "0" - NavigationDrawerIconButton: - icon: 'email-open-outline' - text: "Spam" - on_release: app.root.ids.scr_mngr.current = 'spam' - badge_text: "0" + #NavigationDrawerIconButton: + #text: "Starred" + #icon:'star' + #on_release: app.root.ids.scr_mngr.current = 'starred' + #badge_text: "0" + #NavigationDrawerIconButton: + #icon: 'archive' + #text: "Archieve" + #on_release: app.root.ids.scr_mngr.current = 'archieve' + #badge_text: "0" + #NavigationDrawerIconButton: + #icon: 'email-open-outline' + #text: "Spam" + #on_release: app.root.ids.scr_mngr.current = 'spam' + #badge_text: "0" NavigationDrawerIconButton: id: trash_cnt icon: 'delete' @@ -196,6 +198,7 @@ NavigationLayout: : name: 'inbox' + transition: NoTransition() BoxLayout: orientation: 'vertical' spacing: dp(10) @@ -478,6 +481,7 @@ NavigationLayout: size_hint: .5, .35 height: dp(40) on_press: app.root.ids.scr_mngr.current = 'random' + on_press: app.root.ids.sc7.reset_address_label() MDLabel: font_style: 'Title' text: 'proceed' diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index ad20147d..2cce497d 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -834,13 +834,16 @@ class Random(Screen): for obj in BMConfigParser().addresses()] if entered_label in lables: self.ids.label.error = True - self.ids.label.helper_text = 'Label name is already exist' + self.ids.label.helper_text = 'Label name is already exist you can try this Ex. ( {0}_1, {0}_2 )'.format(entered_label) elif entered_label: self.ids.label.error = False else: self.ids.label.error = False self.ids.label.helper_text = 'This field is required' + def reset_address_label(self): + self.ids.label.text = '' + class Sent(Screen): """Sent Screen uses screen to show widgets of screens.""" @@ -1621,6 +1624,20 @@ class NavigateApp(App): delete_btn] toolbar_obj.right_action_items = dynamic_list + def load_screen(self, instance): + """This method is used for loading screen on every click""" + if instance.text == 'Inbox': + self.root.ids.scr_mngr.current = 'inbox' + self.root.ids.sc1.children[1].active = True + self.root.ids.sc1.ids.ml.clear_widgets() + Clock.schedule_once(partial(self.load_screen_callback, instance), 0.5) + + def load_screen_callback(self, instance, dt=0): + """This method is rotating loader for few seconds""" + if instance.text == 'Inbox': + self.root.ids.sc1.loadMessagelist(state.association) + self.root.ids.sc1.children[1].active = False + class GrashofPopup(Popup): """Methods for saving contacts, error messages.""" @@ -1808,6 +1825,7 @@ class MailDetail(Screen): """Method for mail delete.""" msg_count_objs = state.kivyapp.root.children[2].children[0].ids state.searcing_text = '' + self.children[0].children[0].active = True if state.detailPageType == 'sent': state.kivyapp.root.ids.sc4.children[2].children[1].ids.search_field.text = '' sqlExecute( @@ -1847,12 +1865,11 @@ class MailDetail(Screen): int(state.all_count) - 1) state.trash_count = str(int(state.trash_count) + 1) state.all_count = str(int(state.all_count) - 1) - self.parent.screens[4].clear_widgets() - self.parent.screens[4].add_widget(Trash()) - self.parent.screens[16].clear_widgets() - self.parent.screens[16].add_widget(Allmails()) - self.children[0].children[0].active = True - Clock.schedule_once(self.callback_for_delete, 3) + self.parent.screens[4].ids.ml.clear_widgets() + self.parent.screens[4].init_ui(dt=0) + self.parent.screens[16].ids.ml.clear_widgets() + self.parent.screens[16].init_ui(dt=0) + Clock.schedule_once(self.callback_for_delete, 4) def callback_for_delete(self, dt=0): self.children[0].children[0].active = False