mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Set and get strings
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
e424293293
commit
daeeaa2869
@ -43,6 +43,14 @@ export class SettingsStorage {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
async setString(key, value) {
|
||||
this._set(key, value);
|
||||
}
|
||||
|
||||
async getString(key) {
|
||||
return window.localStorage.getItem(`${this._prefix}${key}`);
|
||||
}
|
||||
|
||||
async remove(key) {
|
||||
window.localStorage.removeItem(`${this._prefix}${key}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user