File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
internal_filesystem/builtin/apps/com.micropythonos.wifi/assets Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 66- AppStore app: add support for BadgeHub backend
77- OSUpdate app: show download speed
88- WiFi app: new "Add network" functionality for out-of-range or hidden networks
9+ - WiFi app: add "Forget" button to delete networks
910- API: add TaskManager that wraps asyncio
1011- API: add DownloadManager that uses TaskManager
1112- API: use aiorepl to eliminate another thread
Original file line number Diff line number Diff line change 2222
2323class WiFi (Activity ):
2424
25+ prefs = None
26+
2527 scan_button_scan_text = "Rescan"
2628 scan_button_scanning_text = "Scanning..."
2729
@@ -66,8 +68,12 @@ def onCreate(self):
6668 def onResume (self , screen ):
6769 print ("wifi.py onResume" )
6870 super ().onResume (screen )
71+
72+ if not self .prefs :
73+ self .prefs = mpos .config .SharedPreferences ("com.micropythonos.system.wifiservice" )
74+
6975 global access_points
70- access_points = mpos . config . SharedPreferences ( "com.micropythonos.system.wifiservice" ) .get_dict ("access_points" )
76+ access_points = self . prefs .get_dict ("access_points" )
7177 if len (self .ssids ) == 0 :
7278 if WifiService .wifi_busy == False :
7379 WifiService .wifi_busy = True
@@ -172,7 +178,7 @@ def edit_network_result_callback(self, result):
172178 if data :
173179 ssid = data .get ("ssid" )
174180 global access_points
175- editor = mpos . config . SharedPreferences ( "com.micropythonos.system.wifiservice" ) .edit ()
181+ editor = self . prefs .edit ()
176182 forget = data .get ("forget" )
177183 if forget :
178184 del access_points [ssid ]
You can’t perform that action at this time.
0 commit comments