Skip to content

Commit

Permalink
fix scroll bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCastle committed Dec 25, 2024
1 parent e97c63a commit 86cf993
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/renderer/state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,10 @@ const libraryMachine = createMachine(
},
loadedFromSearch: {
initial: 'idle',
entry: assign<LibraryState, AnyEventObject>({
dbQuery: () => ({ tags: [] }),
libraryLoadId: () => uniqueId(),
}),
states: {
idle: {},
},
Expand Down Expand Up @@ -986,6 +990,13 @@ const libraryMachine = createMachine(
libraryLoadId: () => uniqueId(),
}),
},
SET_SCROLL_POSITION: {
actions: assign<LibraryState, AnyEventObject>({
scrollPosition: (context, event) => {
return event.position;
},
}),
},
},
},
loadedFromDB: {
Expand Down

0 comments on commit 86cf993

Please sign in to comment.