From 137625f5e99385d54eeb1f8fedd626e4d21bedec Mon Sep 17 00:00:00 2001 From: Konv Suu <2583695112@qq.com> Date: Wed, 12 Mar 2025 13:59:42 +0800 Subject: [PATCH] feat(desktop): use atomWithStorage for masonry column value (#3023) --- .../src/renderer/src/modules/entry-column/atoms/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/renderer/src/modules/entry-column/atoms/index.ts b/apps/desktop/src/renderer/src/modules/entry-column/atoms/index.ts index 836d75310..866b26311 100644 --- a/apps/desktop/src/renderer/src/modules/entry-column/atoms/index.ts +++ b/apps/desktop/src/renderer/src/modules/entry-column/atoms/index.ts @@ -1,5 +1,6 @@ import { createAtomHooks } from "@follow/utils/jotai" -import { atom } from "jotai" +import { getStorageNS } from "@follow/utils/ns" +import { atomWithStorage } from "jotai/utils" export const [, , useMasonryColumnValue, , getMasonryColumnValue, setMasonryColumnValue] = - createAtomHooks(atom(-1)) + createAtomHooks(atomWithStorage(getStorageNS("masonry-column"), -1))