[gnome-shell/gbsneto/icon-grid-dnd: 5/10] folderView: Make sure to only add icons once
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd: 5/10] folderView: Make sure to only add icons once
- Date: Tue, 16 Jul 2019 23:43:11 +0000 (UTC)
commit 60503639e25490c781edaab6b0d24032aae969a8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jul 5 11:36:53 2019 -0300
folderView: Make sure to only add icons once
FolderView implementation currently allows for adding the same
icon multiple times.
Ensure the icon is not already added before adding it.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603
js/ui/appDisplay.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index e4bfa5c45..fb5d8794d 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1424,6 +1424,9 @@ var FolderView = class FolderView extends BaseAppView {
if (!app.get_app_info().should_show())
return;
+ if (apps.some(appIcon => appIcon.id == appId))
+ return;
+
let icon = new AppIcon(app, this, { hideWhileDragging: true });
apps.push(icon);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]