Add a layout reset function

For https://github.com/vector-im/riot-web/issues/14265

Intended to be accessed via `mx_RoomListStore2.resetLayout()`
This commit is contained in:
Travis Ralston 2020-06-30 18:52:13 -06:00
parent f935303eeb
commit 8cfe12b817
2 changed files with 14 additions and 0 deletions

View file

@ -120,6 +120,10 @@ export class ListLayout {
return px / this.tileHeight;
}
public reset() {
localStorage.removeItem(this.key);
}
private save() {
localStorage.setItem(this.key, JSON.stringify(this.serialize()));
}