Skip to content

Commit

Permalink
Don't show audit snackbar if all entries are all 'ok' state
Browse files Browse the repository at this point in the history
I see this on a local nextcloud where the audit dialog only has one entry
which is "ok".

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I55f12125cbc0ca4c88c9220ed114d455e84639e0
  • Loading branch information
caolanm committed Jun 6, 2024
1 parent c19c971 commit 7a7535e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion browser/src/control/Control.ServerAuditDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,14 @@ class ServerAuditDialog {
? this.map._viewInfo[docLayer._viewId]
: null;

if (app.serverAudit.length) {
let hasErrors = false;
app.serverAudit.forEach((entry: any) => {
if (entry.status !== 'ok') {
hasErrors = true;
}
});

if (hasErrors) {
// TODO: enable annoying snackbar later
if (viewInfo && viewInfo.userextrainfo.is_admin === true) {
this.map.uiManager.showSnackbar(
Expand Down

0 comments on commit 7a7535e

Please sign in to comment.