Skip to content

Commit

Permalink
feat: multiuser
Browse files Browse the repository at this point in the history
  • Loading branch information
Adis Durakovic committed Dec 31, 2024
1 parent 3f0bd5f commit 7d53cad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:hive_ce_flutter/adapters.dart';
import 'package:odin/data/entities/config.dart';
import 'package:odin/data/models/auth_model.dart';
import 'package:odin/helpers.dart';
Expand Down Expand Up @@ -29,7 +28,6 @@ class SettingsModel with BaseHelper {
players.firstWhere((element) => element['title'] == config.player);

void init() async {
logInfo("SETTING HERE");
final dynamic mydb = await db.users?.get(auth.me!.device);
final saved = mydb["settings"];
config = Config(
Expand All @@ -40,6 +38,7 @@ class SettingsModel with BaseHelper {
void save() async {
final dynamic mydb = await db.users?.get(auth.me!.device);
mydb["settings"] = {'player': config.player, 'scrobble': config.scrobble};
await db.users?.put(auth.me!.device, mydb);
}
}

Expand Down

0 comments on commit 7d53cad

Please sign in to comment.