This commit is contained in:
Fredrik Burmester
2024-10-11 16:42:13 +02:00
parent b73a33b05b
commit 6752888bb0
7 changed files with 181 additions and 58 deletions

View File

@@ -29,7 +29,7 @@ export const writeToLog = async (
const logs: LogEntry[] = currentLogs ? JSON.parse(currentLogs) : [];
logs.push(newEntry);
const maxLogs = 100;
const maxLogs = 1000;
const recentLogs = logs.slice(Math.max(logs.length - maxLogs, 0));
await AsyncStorage.setItem("logs", JSON.stringify(recentLogs));