From ea18e46e8bfb5080ba4bc28283fa0152d59388a3 Mon Sep 17 00:00:00 2001 From: Yegor Litvyakov Date: Tue, 23 Jan 2024 20:13:58 +0300 Subject: [PATCH] fix(ui): keep `searchText` in local storage Fix: #1437 --- frontend/app/src/store/ui.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/app/src/store/ui.ts b/frontend/app/src/store/ui.ts index 9a3e16f62..f4f3e8f67 100644 --- a/frontend/app/src/store/ui.ts +++ b/frontend/app/src/store/ui.ts @@ -57,6 +57,7 @@ class UiStore { this.tags = t; } + @persist searchText = ''; setSearchText(s: string) { this.searchText = s.toLowerCase(); @@ -173,9 +174,9 @@ class UiStore { const response: MeData = this._meInfo && this._meInfo.owner_pubkey ? { - ...this._meInfo, - img: this._meInfo.img || getUserAvatarPlaceholder(this._meInfo.owner_pubkey) - } + ...this._meInfo, + img: this._meInfo.img || getUserAvatarPlaceholder(this._meInfo.owner_pubkey) + } : null; return response; }