refactor: remove unused clearAllCredentials and log diagnostics helpers

clearAllCredentials() (secureCredentials.ts), clearLogs() and
dumpDownloadDiagnostics() (log.tsx) have no callers anywhere in the tree.
Carried over from the original #1347 cleanup.
This commit is contained in:
Gauvain
2026-06-02 23:20:17 +02:00
parent 89fb0d9624
commit 77d3bc2563
2 changed files with 0 additions and 36 deletions

View File

@@ -72,21 +72,6 @@ export const readFromLog = (): LogEntry[] => {
return logs ? JSON.parse(logs) : [];
};
export const clearLogs = () => {
storage.remove("logs");
};
export const dumpDownloadDiagnostics = (extra: any = {}) => {
const diagnostics = {
timestamp: new Date().toISOString(),
processes: extra?.processes || [],
nativeTasks: extra?.nativeTasks || [],
focusedProcess: extra?.focusedProcess || null,
};
writeDebugLog("Download diagnostics", diagnostics);
return diagnostics;
};
export function useLog() {
const context = useContext(LogContext);
if (context === null) {

View File

@@ -203,27 +203,6 @@ export async function hasAccountCredential(
return stored !== null;
}
/**
* Delete all credentials for all accounts on all servers.
*/
export async function clearAllCredentials(): Promise<void> {
const previousServers = getPreviousServers();
for (const server of previousServers) {
for (const account of server.accounts) {
const key = credentialKey(server.address, account.userId);
await SecureStore.deleteItemAsync(key);
}
}
// Clear all accounts from servers
const clearedServers = previousServers.map((server) => ({
...server,
accounts: [],
}));
storage.set("previousServers", JSON.stringify(clearedServers));
}
/**
* Add or update an account in a server's accounts list.
*/