Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e85c1078b |
||
|
|
0ee2e99288 |
13 changed files with 23 additions and 23 deletions
|
|
@ -35,7 +35,7 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
|
|
||||||
void update(
|
void update(
|
||||||
IMap<String, Room> rooms, [
|
IMap<String, Room> rooms, [
|
||||||
ISet<String> leftRooms = const .empty(),
|
ISet<String> leftRooms = const ISet.empty(),
|
||||||
]) {
|
]) {
|
||||||
final merged = rooms.entries.fold(state, (acc, entry) {
|
final merged = rooms.entries.fold(state, (acc, entry) {
|
||||||
final roomId = entry.key;
|
final roomId = entry.key;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ class const AccountData({
|
||||||
const InvitePermissionConfig(),
|
const InvitePermissionConfig(),
|
||||||
|
|
||||||
@JsonKey(name: AccountData.directKey)
|
@JsonKey(name: AccountData.directKey)
|
||||||
final IMap<String, IList<String>> directMessages = const .empty(),
|
final IMap<String, IList<String>> directMessages = const IMap.empty(),
|
||||||
|
|
||||||
@JsonKey(name: AccountData.recentEmojiKey)
|
@JsonKey(name: AccountData.recentEmojiKey)
|
||||||
final RecentEmojiData recentEmoji = const RecentEmojiData(),
|
final RecentEmojiData recentEmoji = const RecentEmojiData(),
|
||||||
|
|
@ -30,7 +30,7 @@ class const AccountData({
|
||||||
@Freezed(toJson: false, fromJson: false)
|
@Freezed(toJson: false, fromJson: false)
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const RecentEmojiData({
|
class const RecentEmojiData({
|
||||||
final IList<RecentEmoji> recentEmoji = const .empty(),
|
final IList<RecentEmoji> recentEmoji = const IList.empty(),
|
||||||
}) with _$RecentEmojiData {
|
}) with _$RecentEmojiData {
|
||||||
Map<String, Object?> toJson() => _$RecentEmojiDataToJson(this);
|
Map<String, Object?> toJson() => _$RecentEmojiDataToJson(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ sealed class PowerLevelsContent extends Content with _$PowerLevelsContent {
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const Notifications({
|
class const Notifications({
|
||||||
final int room = 50,
|
final int room = 50,
|
||||||
final IMap<String, int> other = const .empty(),
|
final IMap<String, int> other = const IMap.empty(),
|
||||||
}) with _$Notifications {
|
}) with _$Notifications {
|
||||||
Map<String, Object?> toJson() => _$NotificationsToJson(this);
|
Map<String, Object?> toJson() => _$NotificationsToJson(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class const Event({
|
||||||
required final String sender,
|
required final String sender,
|
||||||
@JsonKey(readValue: Event.typeJsonFromJson) required final String type,
|
@JsonKey(readValue: Event.typeJsonFromJson) required final String type,
|
||||||
@EpochDateTimeConverter() required final DateTime timestamp,
|
@EpochDateTimeConverter() required final DateTime timestamp,
|
||||||
final IMap<String, dynamic> unsigned = const .empty(),
|
final IMap<String, dynamic> unsigned = const IMap.empty(),
|
||||||
final LocalContent? localContent,
|
final LocalContent? localContent,
|
||||||
final String? transactionId,
|
final String? transactionId,
|
||||||
final String? redactedBy,
|
final String? redactedBy,
|
||||||
|
|
@ -27,7 +27,7 @@ class const Event({
|
||||||
final String? replyTo,
|
final String? replyTo,
|
||||||
final String? decryptionError,
|
final String? decryptionError,
|
||||||
final String? sendError,
|
final String? sendError,
|
||||||
final IMap<String, int> reactions = const .empty(),
|
final IMap<String, int> reactions = const IMap.empty(),
|
||||||
@JsonKey(name: "last_edit_rowid") final int lastEditRowId = 0,
|
@JsonKey(name: "last_edit_rowid") final int lastEditRowId = 0,
|
||||||
final UnreadType? unreadType,
|
final UnreadType? unreadType,
|
||||||
final Profile? pmp,
|
final Profile? pmp,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class const EventContext({
|
||||||
required final IList<Event> after,
|
required final IList<Event> after,
|
||||||
required final String start,
|
required final String start,
|
||||||
required final String end,
|
required final String end,
|
||||||
final IList<Event> relatedEvents = const .empty(),
|
final IList<Event> relatedEvents = const IList.empty(),
|
||||||
}) with _$EventContext {
|
}) with _$EventContext {
|
||||||
Map<String, Object?> toJson() => _$EventContextToJson(this);
|
Map<String, Object?> toJson() => _$EventContextToJson(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ part "paginate_manual.g.dart";
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const PaginateManual({
|
class const PaginateManual({
|
||||||
required final IList<Event> events,
|
required final IList<Event> events,
|
||||||
final IList<Event> relatedEvents = const .empty(),
|
final IList<Event> relatedEvents = const IList.empty(),
|
||||||
required final String? nextBatch,
|
required final String? nextBatch,
|
||||||
}) with _$PaginateManual {
|
}) with _$PaginateManual {
|
||||||
Map<String, Object?> toJson() => _$PaginateManualToJson(this);
|
Map<String, Object?> toJson() => _$PaginateManualToJson(this);
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class const Profile({
|
||||||
final String? timezone,
|
final String? timezone,
|
||||||
|
|
||||||
@JsonKey(readValue: Profile.readPronouns, name: "m.pronouns")
|
@JsonKey(readValue: Profile.readPronouns, name: "m.pronouns")
|
||||||
final IList<Pronoun> pronouns = const .empty(),
|
final IList<Pronoun> pronouns = const IList.empty(),
|
||||||
}) with _$Profile {
|
}) with _$Profile {
|
||||||
Map<String, Object?> toJson() => _$ProfileToJson(this);
|
Map<String, Object?> toJson() => _$ProfileToJson(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ class const CreateRoomRequest({
|
||||||
final String? roomAliasName,
|
final String? roomAliasName,
|
||||||
final String? name,
|
final String? name,
|
||||||
final String? topic,
|
final String? topic,
|
||||||
final IList<String> invite = const .empty(),
|
final IList<String> invite = const IList.empty(),
|
||||||
@JsonKey(name: "uk.timedout.msc4491.invite_reason")
|
@JsonKey(name: "uk.timedout.msc4491.invite_reason")
|
||||||
final String? inviteReason,
|
final String? inviteReason,
|
||||||
final IList<InitialStateEvent> initialState = const .empty(),
|
final IList<InitialStateEvent> initialState = const IList.empty(),
|
||||||
final RoomPreset? preset,
|
final RoomPreset? preset,
|
||||||
final bool isDirect = false,
|
final bool isDirect = false,
|
||||||
final IMap<String, dynamic>? creationContent,
|
final IMap<String, dynamic>? creationContent,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ part "join_room.g.dart";
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const JoinRoomRequest({
|
class const JoinRoomRequest({
|
||||||
required final String roomIdOrAlias,
|
required final String roomIdOrAlias,
|
||||||
final IList<String> via = const .empty(),
|
final IList<String> via = const IList.empty(),
|
||||||
|
|
||||||
/// Set when accepting an invite, so gomuks can mark DMs as such.
|
/// Set when accepting an invite, so gomuks can mark DMs as such.
|
||||||
final bool fromInvite = false,
|
final bool fromInvite = false,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class const SendMessageRequest({
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class const Mentions({
|
class const Mentions({
|
||||||
final bool room = false,
|
final bool room = false,
|
||||||
final IList<String> userIds = const .empty(),
|
final IList<String> userIds = const IList.empty(),
|
||||||
}) with _$Mentions {
|
}) with _$Mentions {
|
||||||
Map<String, Object?> toJson() => _$MentionsToJson(this);
|
Map<String, Object?> toJson() => _$MentionsToJson(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,15 @@ class const Room({
|
||||||
|
|
||||||
/// [timeline] is an IMap of timelineRowId to eventRowId
|
/// [timeline] is an IMap of timelineRowId to eventRowId
|
||||||
@JsonKey(fromJson: Room.timelineTupleJsonToIMap)
|
@JsonKey(fromJson: Room.timelineTupleJsonToIMap)
|
||||||
final IMap<int, int?> timeline = const .empty(),
|
final IMap<int, int?> timeline = const IMap.empty(),
|
||||||
|
|
||||||
/// [clientSticky] is an ISet of eventRowId
|
/// [clientSticky] is an ISet of eventRowId
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
final ISet<int> clientSticky = const .empty(),
|
final ISet<int> clientSticky = const ISet.empty(),
|
||||||
|
|
||||||
/// [events] is an IMap of eventRowId to event
|
/// [events] is an IMap of eventRowId to event
|
||||||
@JsonKey(fromJson: Room.eventsJsonToIMap)
|
@JsonKey(fromJson: Room.eventsJsonToIMap)
|
||||||
final IMap<int, Event> events = const .empty(),
|
final IMap<int, Event> events = const IMap.empty(),
|
||||||
|
|
||||||
final bool reset = false,
|
final bool reset = false,
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
|
@ -34,9 +34,9 @@ class const Room({
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
final bool hasFetchedMembers = false,
|
final bool hasFetchedMembers = false,
|
||||||
|
|
||||||
final IMap<String, IMap<String, int>> state = const .empty(),
|
final IMap<String, IMap<String, int>> state = const IMap.empty(),
|
||||||
|
|
||||||
final IMap<String, IList<ReadReceipt>> receipts = const .empty(),
|
final IMap<String, IList<ReadReceipt>> receipts = const IMap.empty(),
|
||||||
final bool dismissNotifications = false,
|
final bool dismissNotifications = false,
|
||||||
final bool hasMore = true,
|
final bool hasMore = true,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ part "sync_data.g.dart";
|
||||||
@JsonSerializable(createToJson: false)
|
@JsonSerializable(createToJson: false)
|
||||||
class const SyncData({
|
class const SyncData({
|
||||||
final bool clearState = false,
|
final bool clearState = false,
|
||||||
final IMap<String, IMap<String, dynamic>> accountData = const .empty(),
|
final IMap<String, IMap<String, dynamic>> accountData = const IMap.empty(),
|
||||||
final IMap<String, Room> rooms = const .empty(),
|
final IMap<String, Room> rooms = const IMap.empty(),
|
||||||
final ISet<String> leftRooms = const .empty(),
|
final ISet<String> leftRooms = const ISet.empty(),
|
||||||
final IList<InvitedRoom> invitedRooms = const .empty(),
|
final IList<InvitedRoom> invitedRooms = const IList.empty(),
|
||||||
final IMap<String, IList<SpaceEdge>>? spaceEdges,
|
final IMap<String, IList<SpaceEdge>>? spaceEdges,
|
||||||
final IList<String>? topLevelSpaces,
|
final IList<String>? topLevelSpaces,
|
||||||
}) with _$SyncData {
|
}) with _$SyncData {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import "package:nexus/main.dart";
|
||||||
|
|
||||||
final class const RoomMenuButton(
|
final class const RoomMenuButton(
|
||||||
final Room? room, {
|
final Room? room, {
|
||||||
final IList<Room> children = const .empty(),
|
final IList<Room> children = const IList.empty(),
|
||||||
super.key,
|
super.key,
|
||||||
}) extends ConsumerWidget {
|
}) extends ConsumerWidget {
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue