[gnome-shell/gbsneto/icon-grid-dnd: 91/96] 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: 91/96] folderView: Make sure to only add icons once
- Date: Tue, 16 Jul 2019 23:29:47 +0000 (UTC)
commit e5a5d9887d3c49165ac077f9a03aec0a3e722aaf
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 ee225889d..b15243484 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]