Skip to content

Commit a52e766

Browse files
Simplify
1 parent 50384d4 commit a52e766

File tree

1 file changed

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

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
from mpos.apps import Intent
44
from mpos import PackageManager, SettingActivity, SettingsActivity
5-
import mpos.config
6-
import mpos.ui
7-
import mpos.time
85

96
from calibrate_imu import CalibrateIMUActivity
107
from check_imu_calibration import CheckIMUCalibrationActivity
118

12-
# Used to list and edit all settings:
139
class Settings(SettingsActivity):
1410

1511
"""Override getIntent to provide prefs and settings via Intent extras"""
@@ -40,7 +36,9 @@ def getIntent(self):
4036
("Turquoise", "40e0d0")
4137
]
4238
intent = Intent()
39+
import mpos.config
4340
intent.putExtra("prefs", mpos.config.SharedPreferences("com.micropythonos.settings"))
41+
import mpos.time
4442
intent.putExtra("settings", [
4543
# Basic settings, alphabetically:
4644
{"title": "Light/Dark Theme", "key": "theme_light_dark", "ui": "radiobuttons", "ui_options": [("Light", "light"), ("Dark", "dark")], "changed_callback": self.theme_changed},
@@ -98,4 +96,5 @@ def format_internal_data_partition(self, new_value):
9896
PackageManager.refresh_apps()
9997

10098
def theme_changed(self, new_value):
99+
import mpos.ui
101100
mpos.ui.set_theme(self.prefs)

0 commit comments

Comments
 (0)