feat: re add group column

This commit is contained in:
2024-04-09 14:05:50 +07:00
parent 420be77b5c
commit 5e6692cd6d
10 changed files with 200 additions and 78 deletions

View File

@@ -19,7 +19,6 @@ enum NSTORE_KEYS {
settings = "lume_user_settings",
interests = "lume_user_interests",
columns = "lume_user_columns",
group = "lume_group_",
}
export class Ark {
@@ -654,11 +653,36 @@ export class Ark {
content: JSON.stringify(interests),
});
return cmd;
} catch (e) {
throw new Error(String(e));
}
}
public async get_nstore(key: string) {
try {
const cmd: string = await invoke("get_nstore", {
key,
});
const parse: string | string[] = cmd ? JSON.parse(cmd) : null;
if (!parse.length) return null;
return parse;
} catch {
return null;
}
}
public async set_nstore(key: string, content: string) {
try {
const cmd: string = await invoke("set_nstore", {
key,
content,
});
return cmd;
} catch (e) {
throw new Error(String(e));
}
}
public open_thread(id: string) {
try {
const window = new WebviewWindow(`event-${id}`, {