feat: prioritize loading latest selected items (#1930)
This commit is contained in:
@@ -118,7 +118,7 @@ const DisplayOptionsMenu: FunctionComponent<DisplayOptionsMenuProps> = ({
|
||||
void changePreferences({ sortBy: sort })
|
||||
}
|
||||
},
|
||||
[preferences, changePreferences, toggleSortReverse],
|
||||
[preferences.sortBy, toggleSortReverse, changePreferences],
|
||||
)
|
||||
|
||||
const toggleSortByDateModified = useCallback(() => {
|
||||
|
||||
@@ -17,6 +17,12 @@ const Persistence = ({ application }: Props) => {
|
||||
const toggleStatePersistence = (shouldPersist: boolean) => {
|
||||
application.setValue(ShouldPersistNoteStateKey, shouldPersist)
|
||||
setShouldPersistNoteState(shouldPersist)
|
||||
|
||||
if (shouldPersist) {
|
||||
application.getViewControllerManager().persistValues()
|
||||
} else {
|
||||
application.getViewControllerManager().clearPersistedValues()
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user