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>
This commit is contained in:
Vincent Petry 2021-02-02 16:32:24 +01:00
parent e4bfbfe177
commit 1936895a42
No known key found for this signature in database
GPG Key ID: E055D6A4D513575C
3 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -31,9 +31,14 @@
return
}
// 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
}
},
}