[gnome-shell/gbsneto/icon-grid-part1: 27/30] 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-part1: 27/30] folderView: Make sure to only add icons once
- Date: Tue, 30 Jul 2019 14:32:25 +0000 (UTC)
commit 8e0b47585da06bcc2d0e19f2bf49e904360d2f18
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/645
js/ui/appDisplay.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index c0358a414..bcd1c8f68 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1168,6 +1168,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);
apps.push(icon);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]