🐛 fix(ui): prevent duplicate dialogs on long press in LauncherActivity
This commit is contained in:
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 SearchTask mSearchTask;
|
||||||
|
private Dialog globalSettingsDialog;
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
private void showSearchResult(ArrayList<Apps> filteredApps) {
|
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)
|
// Check if the touch is on an empty area (not on an app)
|
||||||
View touchedView = findViewAt(e.getX(), e.getY());
|
View touchedView = findViewAt(e.getX(), e.getY());
|
||||||
if (!(touchedView instanceof AppTextView)) {
|
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
|
- Added `Set as Default Launcher` option
|
||||||
- Improve Search Bar Gesture
|
- Improve Search Bar Gesture
|
||||||
- Added Toggle button for search bar gesture
|
- Added Toggle button for search bar gesture
|
||||||
|
- Fixed Duplicate Dialogs on Long Press
|
||||||
|
|
||||||
* Project Shource codes Changes.
|
* Project Shource codes Changes.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user