mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 04:41:03 +00:00
feat: sidebar badge on new game download option
This commit is contained in:
16
src/main/level/sublevels/downloadSourcesCheckTimestamp.ts
Normal file
16
src/main/level/sublevels/downloadSourcesCheckTimestamp.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { levelKeys } from "./keys";
|
||||
import { db } from "../level";
|
||||
|
||||
export const getLastDownloadSourcesCheck = async (): Promise<string | null> => {
|
||||
try {
|
||||
const timestamp = await db.get(levelKeys.lastDownloadSourcesCheck);
|
||||
return timestamp;
|
||||
} catch (error) {
|
||||
// Key doesn't exist yet
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export const updateLastDownloadSourcesCheck = async (timestamp: string): Promise<void> => {
|
||||
await db.put(levelKeys.lastDownloadSourcesCheck, timestamp);
|
||||
};
|
||||
Reference in New Issue
Block a user