fix: column overlapped after change account
This commit is contained in:
@@ -242,15 +242,19 @@ export class NostrQuery {
|
||||
const systemColumns: LumeColumn[] = JSON.parse(resourceFile);
|
||||
const query = await commands.getNstore(NSTORE_KEYS.columns);
|
||||
|
||||
if (query.status === "ok") {
|
||||
const columns: LumeColumn[] = query.data ? JSON.parse(query.data) : [];
|
||||
try {
|
||||
if (query.status === "ok") {
|
||||
const columns: LumeColumn[] = JSON.parse(query.data);
|
||||
|
||||
if (columns.length < 1) {
|
||||
if (!columns?.length) {
|
||||
return systemColumns;
|
||||
}
|
||||
|
||||
return columns;
|
||||
} else {
|
||||
return systemColumns;
|
||||
}
|
||||
|
||||
return columns;
|
||||
} else {
|
||||
} catch {
|
||||
return systemColumns;
|
||||
}
|
||||
}
|
||||
|
||||
2
packages/types/index.d.ts
vendored
2
packages/types/index.d.ts
vendored
@@ -110,7 +110,7 @@ export interface LumeColumn {
|
||||
}
|
||||
|
||||
export interface EventColumns {
|
||||
type: "add" | "remove" | "update" | "left" | "right" | "set_title";
|
||||
type: "reset" | "add" | "remove" | "update" | "left" | "right" | "set_title";
|
||||
label?: string;
|
||||
title?: string;
|
||||
column?: LumeColumn;
|
||||
|
||||
Reference in New Issue
Block a user