Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backswipe:fix could not blcklist messagegui.new.js #3391

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/backswipe/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.01: New App!
0.02: Don't fire if the app uses swipes already.
0.03: Only count defined handlers in the handler array.
0.04: Fix messages auto opened by `messagegui` could not be blacklisted. Needs
a refresh by deselecting and reselecting the "Messages" app throught Back Swipe
settings.
4 changes: 2 additions & 2 deletions apps/backswipe/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
function enabledForApp(app) {
if (!settings) return true;
if (settings.mode === 0) {
return !(settings.apps.filter((a) => a.src === app).length > 0);
return !(settings.apps.filter((a) => (a.src===app)||(a.files&&a.files.includes(app))).length > 0); // The `a.src===app` and `a.files&&...` checks are for backwards compatibility. Otherwise only `a.files.includes(app)` is needed.
} else if (settings.mode === 1) {
return settings.apps.filter((a) => a.src === app).length > 0;
return settings.apps.filter((a) => (a.src===app)||(a.files&&a.files.includes(app))).length > 0;
} else {
return settings.mode === 2 ? true : false;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/backswipe/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ "id": "backswipe",
"name": "Back Swipe",
"shortName":"BackSwipe",
"version":"0.03",
"version":"0.04",
"description": "Service that allows you to use an app's back button using left to right swipe gesture",
"icon": "app.png",
"tags": "back,gesture,swipe",
Expand Down
3 changes: 2 additions & 1 deletion apps/backswipe/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
return appInfo && {
'name': appInfo.name,
'sortorder': appInfo.sortorder,
'src': appInfo.src
'src': appInfo.src,
'files': appInfo.files
};
}).filter(app => app && !!app.src);
apps.sort((a, b) => {
Expand Down