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