From 096fa16c4cbee60206e66209175501ac16eda3e0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 13 Oct 2023 16:49:56 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20TL=E3=81=AE=E8=BF=94?= =?UTF-8?q?=E4=BF=A1=E8=A1=A8=E7=A4=BA=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E8=A8=98=E6=86=B6=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #12016 --- CHANGELOG.md | 11 +++++++++++ packages/frontend/src/pages/timeline.vue | 6 +++++- packages/frontend/src/store.ts | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 422296639..50334560c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ --> +## 2023.x.x (unreleased) + +### General +- + +### Client +- Enhance: TLの返信表示オプションを記憶するように + +### Server +- + ## 2023.10.1 ### General - Enhance: ローカルタイムライン、ソーシャルタイムラインで返信を含むかどうか設定可能に diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 3449449a7..8cc540779 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -62,11 +62,15 @@ let queue = $ref(0); let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); const withRenotes = $ref(true); -const withReplies = $ref(false); +const withReplies = $ref($i ? defaultStore.state.tlWithReplies : false); const onlyFiles = $ref(false); watch($$(src), () => queue = 0); +watch($$(withReplies), (x) => { + if ($i) defaultStore.set('tlWithReplies', x); +}); + function queueUpdated(q: number): void { queue = q; } diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 58730c7ce..2829411ae 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -357,6 +357,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: false, }, + tlWithReplies: { + where: 'device', + default: false, + }, })); // TODO: 他のタブと永続化されたstateを同期