From 152511b638b1b566d58b4f2efb337673667edd8b Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Tue, 16 Aug 2022 13:27:44 +0530 Subject: [PATCH] Add json.load to read screen-data.json file --- src/bitmessagekivy/mpybit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 9c41eaa5..0953e8fd 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -5,8 +5,8 @@ Bitmessage android(mobile) interface """ -import ast import os +import json import importlib from kivy.lang import Builder @@ -34,7 +34,7 @@ from pybitmessage.bitmessagekivy.kivy_state import KivyStateVariables from pybitmessage.bmconfigparser import config with open(os.path.join(os.path.dirname(__file__), "screens_data.json")) as read_file: - all_data = ast.literal_eval(read_file.read()) + all_data = json.load(read_file) data_screens = list(all_data.keys()) for key in all_data: @@ -115,8 +115,8 @@ class ContentNavigationDrawer(BoxLayout): def check_scroll_y(self, instance, somethingelse): """show data on scroll down""" - if self.ids.btn.is_open: - self.ids.btn.is_open = False + if self.ids.identity_dropdown.is_open: + self.ids.identity_dropdown.is_open = False class CustomSpinner(Spinner):