forked from akai/readest
fix: get rid of invalid grid insets (#1943)
This commit is contained in:
@@ -148,7 +148,7 @@ const HeaderBar: React.FC<HeaderBarProps> = ({
|
||||
!windowButtonVisible && 'max-w-[50%]',
|
||||
)}
|
||||
>
|
||||
{bookTitle} {bookTitle} {bookTitle} {bookTitle}
|
||||
{bookTitle}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user