🐛 fix(ui): prevent duplicate dialogs on long press in LauncherActivity

This commit is contained in:
sankalp committed 2025-07-02 22:30:11 +05:45
1 parent 25656bcc4e
commit 8cd2e64441
2 files changed
+7 -1

No files matched your search

@@ -195,6 +195,7 @@ public class LauncherActivity extends Activity implements View.OnClickListener,
}
};
private SearchTask mSearchTask;
private Dialog globalSettingsDialog;
//endregion
private void showSearchResult(ArrayList<Apps> filteredApps) {
@@ -291,7 +292,11 @@ public class LauncherActivity extends Activity implements View.OnClickListener,
// Check if the touch is on an empty area (not on an app)
View touchedView = findViewAt(e.getX(), e.getY());
if (!(touchedView instanceof AppTextView)) {
showDialog(new GlobalSettingsDialog(LauncherActivity.this, LauncherActivity.this), true);
if (globalSettingsDialog == null || !globalSettingsDialog.isShowing()) {
globalSettingsDialog = new GlobalSettingsDialog(LauncherActivity.this, LauncherActivity.this);
globalSettingsDialog.setOnDismissListener(d -> globalSettingsDialog = null);
globalSettingsDialog.show();
}
}
}
});
@@ -11,6 +11,7 @@
- Added `Set as Default Launcher` option
- Improve Search Bar Gesture
- Added Toggle button for search bar gesture
- Fixed Duplicate Dialogs on Long Press
* Project Shource codes Changes.