diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-13 16:49:56 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-13 16:49:56 +0900 |
| commit | 096fa16c4cbee60206e66209175501ac16eda3e0 (patch) | |
| tree | 669d5a5269318cd09cc20ccb8e11a4c2583afeb3 /packages | |
| parent | .js (diff) | |
| download | sharkey-096fa16c4cbee60206e66209175501ac16eda3e0.tar.gz sharkey-096fa16c4cbee60206e66209175501ac16eda3e0.tar.bz2 sharkey-096fa16c4cbee60206e66209175501ac16eda3e0.zip | |
enhance(frontend): TLの返信表示オプションを記憶するように
Resolve #12016
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/pages/timeline.vue | 6 | ||||
| -rw-r--r-- | packages/frontend/src/store.ts | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 3449449a7a..8cc540779b 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 58730c7cef..2829411ae5 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を同期 |