File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11{
2- setTimeout ( ( ) => { // wrap in zero ms timeout so the foreground app loads first.
32 const storage = require ( "Storage" ) ;
4- let settings = storage . readJSON ( "quicklaunch.json" , true ) || { } ;
3+ let settings ;
54
65 let leaveTrace = function ( trace ) {
6+ if ( ! settings ) settings = storage . readJSON ( "quicklaunch.json" , true ) || { } ;
7+
78 settings . trace = trace ;
89 storage . writeJSON ( "quicklaunch.json" , settings ) ;
910 return trace ;
1011 } ;
1112
1213 let launchApp = function ( trace ) {
14+ if ( ! settings ) settings = storage . readJSON ( "quicklaunch.json" , true ) || { } ;
15+
1316 if ( settings [ trace + "app" ] . src ) {
1417 if ( settings [ trace + "app" ] . name == "Show Launcher" ) Bangle . showLauncher ( ) ;
1518 else if ( ! storage . read ( settings [ trace + "app" ] . src ) ) {
@@ -41,5 +44,4 @@ setTimeout(() => { // wrap in zero ms timeout so the foreground app loads first.
4144 if ( ud == 1 ) trace = leaveTrace ( "d" ) ; // d=down.
4245 launchApp ( trace ) ;
4346 } ) ;
44- } , 0 ) ;
4547}
You can’t perform that action at this time.
0 commit comments