mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix: make tag aliases syncable
This commit is contained in:
@@ -37,6 +37,7 @@ class Settings {
|
||||
...item.groupOptions,
|
||||
...this._settings.groupOptions,
|
||||
};
|
||||
this._settings.aliases = {};
|
||||
} else {
|
||||
this._initSettings(item);
|
||||
}
|
||||
@@ -68,6 +69,15 @@ class Settings {
|
||||
);
|
||||
}
|
||||
|
||||
async setAlias(id, name) {
|
||||
this._settings.aliases[id] = name;
|
||||
await this._saveSettings();
|
||||
}
|
||||
|
||||
getAlias(id) {
|
||||
return this._settings.aliases[id];
|
||||
}
|
||||
|
||||
async pin(type, data) {
|
||||
if (type !== "notebook" && type !== "topic" && type !== "tag")
|
||||
throw new Error("This item cannot be pinned.");
|
||||
@@ -120,6 +130,7 @@ class Settings {
|
||||
id: id(),
|
||||
pins: [],
|
||||
groupOptions: {},
|
||||
aliases: {},
|
||||
dateEdited: 0,
|
||||
dateCreated: 0,
|
||||
...(settings || {}),
|
||||
|
||||
Reference in New Issue
Block a user