Skip to content

Commit

Permalink
fix last opened (recent saves) (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbenington authored Dec 30, 2024
1 parent 74a2fe3 commit 3614d88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"icons/icon.ico"
],
"macOS": {
"signingIdentity": "9MGK3X58YN",
"minimumSystemVersion": "14.6"
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/backend/tauri/tauriBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { open as fileDialog } from '@tauri-apps/plugin-dialog'
import { readFile, stat } from '@tauri-apps/plugin-fs'
import { platform } from '@tauri-apps/plugin-os'
import { open } from '@tauri-apps/plugin-shell'
import dayjs from 'dayjs'
import * as E from 'fp-ts/lib/Either'
import BackendInterface from 'src/backend/backendInterface'
import { OHPKM } from 'src/types/pkm/OHPKM'
Expand Down Expand Up @@ -148,7 +149,7 @@ export const TauriBackend: BackendInterface = {

const recentSaves = recentSavesResult.right

recentSaves[saveRef.filePath.raw] = saveRef
recentSaves[saveRef.filePath.raw] = { ...saveRef, lastOpened: dayjs().unix() * 1000 }
return TauriInvoker.writeStorageFileJSON('recent_saves.json', recentSaves as JSONObject)
},
removeRecentSave: async (filePath: string): Promise<Errorable<null>> => {
Expand Down

0 comments on commit 3614d88

Please sign in to comment.