forked from Nexus/nexus
add GomuksEvent model
This commit is contained in:
parent
b4d5a632dd
commit
b154b4ee2e
1 changed files with 114 additions and 93 deletions
|
|
@ -8,6 +8,7 @@ import "package:nexus/controllers/client.dart";
|
|||
import "package:nexus/models/account_data.dart";
|
||||
import "package:nexus/models/push_rules.dart";
|
||||
import "package:nexus/models/requests/update_push_rule.dart";
|
||||
import "package:nexus/models/sync_data.dart";
|
||||
|
||||
class AccountDataController extends Notifier<AccountData> {
|
||||
@override
|
||||
|
|
@ -26,6 +27,11 @@ class AccountDataController extends Notifier<AccountData> {
|
|||
}
|
||||
});
|
||||
|
||||
void handleSync(SyncData sync) {
|
||||
if (sync.clearState) state = .new();
|
||||
update(sync.accountData);
|
||||
}
|
||||
|
||||
Future<void> setEnabledImagePacks(ImagePackRooms packs) {
|
||||
ISet<(String, String)> keysOf(ImagePackRooms rooms) => rooms.rooms.entries
|
||||
.expand((entry) => entry.value.keys.map((key) => (entry.key, key)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue