mirror of
https://github.com/MrLowPr/overdrive.git
synced 2026-10-21 16:01:20 +02:00
15 lines
448 B
JavaScript
15 lines
448 B
JavaScript
// ../pub-game-store/native/state/recent.js
|
|
// reconstructed from the esbuild bundle in eboot.bin
|
|
|
|
import { savedList } from './saved.js';
|
|
|
|
var LIMIT = 12;
|
|
var recent = savedList("recent.json", "recently viewed");
|
|
function recordVisit(id) {
|
|
const ids = recent.get();
|
|
if (ids[0] !== id) recent.set([id, ...ids.filter((other) => other !== id)].slice(0, LIMIT));
|
|
}
|
|
var useRecent = recent.useList;
|
|
|
|
export { recordVisit, useRecent };
|