feat: improve splash screen and notification service

This commit is contained in:
reya
2024-05-29 10:33:38 +07:00
parent 32f3315344
commit d2e5122d5a
20 changed files with 137 additions and 185 deletions

View File

@@ -31,7 +31,7 @@ export const commands = {
else return { status: "error", error: e as any };
}
},
async getAccounts(): Promise<Result<string, string>> {
async getAccounts(): Promise<Result<string[], string>> {
try {
return { status: "ok", data: await TAURI_INVOKE("get_accounts") };
} catch (e) {
@@ -150,17 +150,6 @@ export const commands = {
else return { status: "error", error: e as any };
}
},
async runNotification(accounts: string[]): Promise<Result<null, null>> {
try {
return {
status: "ok",
data: await TAURI_INVOKE("run_notification", { accounts }),
};
} catch (e) {
if (e instanceof Error) throw e;
else return { status: "error", error: e as any };
}
},
async getActivities(
account: string,
kind: string,