Merge pull request #4 from t0m1o1/Swipe-Launcher

Stop the swiping coming up if mode is undefined
pull/924/head
t0m1o1 2021-11-20 20:56:22 +00:00 committed by GitHub
commit dec967f1ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@
var sui = Bangle.setUI;
Bangle.setUI = function(mode, cb) {
sui(mode,cb);
if (mode && !mode.startsWith("clock")) return;
if(!mode) return;
if (!mode.startsWith("clock")) return;
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
Bangle.on("swipe", Bangle.swipeHandler);
};