Better model updates

This commit is contained in:
Gregory Schier
2023-03-31 13:21:02 -07:00
parent 946d7dc89e
commit 2836a28988
24 changed files with 273 additions and 215 deletions

View File

@@ -1,11 +1,11 @@
import { getKeyValue, setKeyValue } from './keyValueStore';
import { getKeyValue, NAMESPACE_NO_SYNC, setKeyValue } from './keyValueStore';
export async function getLastLocation(): Promise<string> {
return getKeyValue({ key: 'last_location', fallback: '/' });
return getKeyValue({ namespace: NAMESPACE_NO_SYNC, key: 'last_location', fallback: '/' });
}
export async function setLastLocation(pathname: string): Promise<void> {
return setKeyValue({ key: 'last_location', value: pathname });
return setKeyValue({ namespace: NAMESPACE_NO_SYNC, key: 'last_location', value: pathname });
}
export async function syncLastLocation(): Promise<void> {