Skip to content

Commit

Permalink
Fix duplicate tag info view registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
PVince81 authored and backportbot[bot] committed Feb 4, 2021
1 parent 333ff64 commit b97214f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/systemtags/src/filesplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
}

Expand Down

0 comments on commit b97214f

Please sign in to comment.