Merge branch 'soru/fix-store' into 'main'
fix: Multiple related store things Closes #189 See merge request ChristianPauly/fluffychat-flutter!241
This commit is contained in:
commit
a5c12a08ec
8 changed files with 37 additions and 241 deletions
|
|
@ -81,8 +81,7 @@ class MatrixState extends State<Matrix> {
|
|||
void clean() async {
|
||||
if (!kIsWeb) return;
|
||||
|
||||
final storage = await getLocalStorage();
|
||||
await storage.deleteItem(widget.clientName);
|
||||
await store.deleteItem(widget.clientName);
|
||||
}
|
||||
|
||||
void _initWithStore() async {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class ThemeSwitcherWidgetState extends State<ThemeSwitcherWidget> {
|
|||
BuildContext context;
|
||||
|
||||
Future loadSelection(MatrixState matrix) async {
|
||||
String item = await matrix.store.getItem('theme') ?? 'system';
|
||||
var item = await matrix.store.getItem('theme') ?? 'system';
|
||||
selectedTheme = Themes.values.firstWhere(
|
||||
(e) => e.toString() == 'Themes.' + item,
|
||||
orElse: () => Themes.system);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue