fix: get rid of invalid grid insets (#1943)

This commit is contained in:
Huang Xin
2025-09-01 13:05:48 +08:00
committed by GitHub
parent f69422a61c
commit f4b00d6dec
2 changed files with 3 additions and 2 deletions
@@ -148,7 +148,7 @@ const HeaderBar: React.FC<HeaderBarProps> = ({
!windowButtonVisible && 'max-w-[50%]',
)}
>
{bookTitle} {bookTitle} {bookTitle} {bookTitle}
{bookTitle}
</h2>
</div>
+2 -1
View File
@@ -327,7 +327,8 @@ export const useReaderStore = create<ReaderStore>((set, get) => ({
},
})),
getGridInsets: (key: string) => get().viewStates[key]?.gridInsets || null,
getGridInsets: (key: string) =>
get().viewStates[key]?.gridInsets || { top: 0, right: 0, bottom: 0, left: 0 },
setGridInsets: (key: string, insets: Insets | null) =>
set((state) => ({
viewStates: {