Skip to content

Commit

Permalink
fix(settings): Last scan info (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
yadPe authored Mar 27, 2021
1 parent 58aada1 commit b0db528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App/modules/Settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const Settings = ({ userPreferences }) => {
name: osuSongsPath ? 'Scan Osu! songs' : 'Osu! folder not set',
action: scanOsuSongs,
description: lastScan
? `${lastScan.beatmaps} beatmap sets found - Last scan ${new Date(lastScan.date).toDateString()}`
? `${lastScan.beatmaps} beatmap sets found - Last scan ${new Date(lastScan.date).toLocaleString()}`
: '',
type: 'Button',
},
Expand Down
2 changes: 1 addition & 1 deletion src/App/modules/Settings/utils/useScanOsuSongs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const useOsuDbScan = () => {
if (args.err) error(`Error while scannings song: ${args.err}`);
else {
history.set(args);
setLastScan({ date: Date.now(), beatmaps: Object.keys(args).length });
setLastScan({ date: Date.now(), beatmaps: Object.keys(args.beatmaps).length });
}
});
ipcRenderer.on('osuSongsScanError', (e, args) => {
Expand Down

0 comments on commit b0db528

Please sign in to comment.