From a67572d70854fd59a3baffbe286a9d77a90e43d7 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Thu, 17 Mar 2022 15:15:24 +0530 Subject: [PATCH] Separated kivy variables in kivy_state.py instead of state.py and initialized inside mpybit --- src/bitmessagekivy/kivy_state.py | 36 ++++++++++++++++++++++++++++++++ src/bitmessagekivy/mpybit.py | 3 +++ 2 files changed, 39 insertions(+) create mode 100644 src/bitmessagekivy/kivy_state.py diff --git a/src/bitmessagekivy/kivy_state.py b/src/bitmessagekivy/kivy_state.py new file mode 100644 index 00000000..f5388b77 --- /dev/null +++ b/src/bitmessagekivy/kivy_state.py @@ -0,0 +1,36 @@ +# pylint: disable=too-many-instance-attributes, too-few-public-methods + +""" +Kivy State variables are assigned here, they are separated from state.py +================================= +""" + + +class KivyStateVariables(object): + """This Class hold all the kivy state variables""" + + def __init__(self): + self.association = '' + self.navinstance = None + self.mail_id = 0 + self.myAddressObj = None + self.detailPageType = None + self.ackdata = None + self.status = None + self.screen_density = None + self.msg_counter_objs = None + self.check_sent_acc = None + self.sent_count = 0 + self.inbox_count = 0 + self.trash_count = 0 + self.draft_count = 0 + self.all_count = 0 + self.searcing_text = '' + self.search_screen = '' + self.send_draft_mail = None + self.is_allmail = False + self.in_composer = False + self.availabe_credit = 0 + self.in_sent_method = False + self.in_search_mode = False + self.imageDir = None diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index b44b1070..14eed581 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -6,9 +6,12 @@ from kivy.app import App from kivy.uix.label import Label +from pybitmessage.bitmessagekivy.kivy_state import KivyStateVariables + class NavigateApp(App): """Navigation Layout of class""" + kivy_state_obj = KivyStateVariables() def build(self): """Method builds the widget"""