From 05b67fc486b267520734d8c380979feafc23b138 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 28 Jan 2025 22:02:52 +0200 Subject: [PATCH] fix(mobile): backend log not shown (fixes #1058) --- src/public/app/widgets/note_detail.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.js index 6ffed4514..3fad9f138 100644 --- a/src/public/app/widgets/note_detail.js +++ b/src/public/app/widgets/note_detail.js @@ -147,11 +147,14 @@ export default class NoteDetailWidget extends NoteContextAwareWidget { */ checkFullHeight() { // https://github.com/zadam/trilium/issues/2522 - this.$widget.toggleClass( - "full-height", - (!this.noteContext.hasNoteList() && ["canvas", "webView", "noteMap", "mindMap", "geoMap"].includes(this.type) && this.mime !== "text/x-sqlite;schema=trilium") || - this.noteContext.viewScope.viewMode === "attachments" - ); + const isBackendNote = this.noteContext?.noteId === "_backendLog"; + const isSqlNote = this.mime === "text/x-sqlite;schema=trilium"; + const isFullHeightNoteType = ["canvas", "webView", "noteMap", "mindMap", "geoMap"].includes(this.type); + const isFullHeight = (!this.noteContext.hasNoteList() && isFullHeightNoteType && !isSqlNote) + || this.noteContext.viewScope.viewMode === "attachments" + || isBackendNote; + + this.$widget.toggleClass("full-height", isFullHeight); } getTypeWidget() {