mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-09-23 04:19:39 +00:00
Added separate class for syncing multiple preference fields with stores
This will make the sync code less boilerplate-y. Instead of manually subscribing back and forth, this will be done inside the class in correct order and in any amount. Types are a bit wonky though.
This commit is contained in:
@@ -70,6 +70,10 @@ export class PreferenceField<
|
||||
set(value: Fields[Key]) {
|
||||
return this.#preferences.writeRaw(this.#fieldKey, value);
|
||||
}
|
||||
|
||||
get key(): Key {
|
||||
return this.#fieldKey;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user