Yes, the launcher currently needs to load the clock app using setTimeout(eval,0,s.read(".bootcde")); and additionally it needs to undo all changes with a global impact other than Bangle.loadWidgets() to prevent memory/resource leaks. The default launcher for example does the cleanup in lines 48-50 in the returnToClock-method.
The clock needs to use Bangle.setUI and give it an options object containing a remove method to clean up everything it changed in the global scope.
If clock and launcher are implemented this way, fast switching between those works. If only one of launcher and clock use this way fast switching only works while leaving that app.
I did some work on getting remove-functionality into dtlaunch here. It worked ok, but when using it with a modified bwclock I had a ram leak somewhere. Not sure if that was dtlaunch or bwclock though - or both. If you want you're of course free to use this as a starting point for bringing fast loading to the 'official' dtlaunch, @Hank! :) I think there have been some developments since I worked on it, some (or maybe all :P ) of which @halemmerich mention above.
© Espruino, powered by microcosm.
Report a problem