Skip to content

Commit 062d406

Browse files
Simplify
1 parent be20ed6 commit 062d406

File tree

1 file changed

+3
-6
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.settings/assets

1 file changed

+3
-6
lines changed

internal_filesystem/builtin/apps/com.micropythonos.settings/assets/settings.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import lvgl as lv
2+
23
from mpos.apps import Intent
34
from mpos import PackageManager, SettingActivity, SettingsActivity
45
import mpos.config
@@ -10,9 +11,10 @@
1011

1112
# Used to list and edit all settings:
1213
class Settings(SettingsActivity):
14+
1315
def __init__(self):
1416
super().__init__()
15-
self.prefs = None
17+
self.prefs = mpos.config.SharedPreferences("com.micropythonos.settings")
1618
theme_colors = [
1719
("Aqua Blue", "00ffff"),
1820
("Bitcoin Orange", "f0a010"),
@@ -56,11 +58,6 @@ def __init__(self):
5658
# Maybe also add font size (but ideally then all fonts should scale up/down)
5759
]
5860

59-
def onCreate(self):
60-
if not self.prefs:
61-
self.prefs = mpos.config.SharedPreferences("com.micropythonos.settings")
62-
super().onCreate()
63-
6461
# Change handlers:
6562
def reset_into_bootloader(self, new_value):
6663
if new_value is not "bootloader":

0 commit comments

Comments
 (0)