Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-02-02 18:32:24 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-02-04 00:50:40 +0300
commit8b04280f38f66dc474a400e5c36e050f54f6488f (patch)
tree2049ddd7997d98ec8a303ab286b38cd46989f557 /apps/systemtags/src/filesplugin.js
parent2004bf74eba60cce1fe8b2f56c567025c4b3270f (diff)
Fix duplicate tag info view registration
Only register the tag info view once as it's stored in a singleton. This fixes an issue where the tag info view did not get rendered after swiching between different file views. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/systemtags/src/filesplugin.js')
-rw-r--r--apps/systemtags/src/filesplugin.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/systemtags/src/filesplugin.js b/apps/systemtags/src/filesplugin.js
index 0263fe6beb9..ac6fe4174b6 100644
--- a/apps/systemtags/src/filesplugin.js
+++ b/apps/systemtags/src/filesplugin.js
@@ -31,9 +31,14 @@
return
}
- const systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView()
- fileList.registerDetailView(systemTagsInfoView)
- OCA.SystemTags.View = systemTagsInfoView
+ // only create and attach once
+ // FIXME: this should likely be done on a different code path now
+ // for the sidebar to only have it registered once
+ if (!OCA.SystemTags.View) {
+ const systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView()
+ fileList.registerDetailView(systemTagsInfoView)
+ OCA.SystemTags.View = systemTagsInfoView
+ }
},
}