Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

add invite support

Closes #82
This commit is contained in:
Henry Hiles 2026-10-15 00:35:38 -04:00
commit d37ec2878b
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
21 changed files with 561 additions and 147 deletions

View file

@ -1,5 +1,6 @@
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/invited_room.dart";
import "package:nexus/models/room.dart";
import "package:nexus/models/space_edge.dart";
@ -7,17 +8,16 @@ part "sync_data.freezed.dart";
part "sync_data.g.dart";
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
@JsonSerializable(createToJson: false)
class const SyncData({
final bool clearState = false,
final IMap<String, IMap<String, dynamic>> accountData = const IMap.empty(),
final IMap<String, Room> rooms = const IMap.empty(),
final ISet<String> leftRooms = const ISet.empty(),
final IList<InvitedRoom> invitedRooms = const IList.empty(),
final IMap<String, IList<SpaceEdge>>? spaceEdges,
final IList<String>? topLevelSpaces,
}) with _$SyncData {
Map<String, Object?> toJson() => _$SyncDataToJson(this);
factory SyncData.fromJson(Map<String, Object?> json) =>
_$SyncDataFromJson(json);
}