shows room but not really

This commit is contained in:
Henry Hiles 2026-01-27 19:09:43 +00:00
commit a28bced44d
No known key found for this signature in database
23 changed files with 885 additions and 805 deletions

View file

@ -8,6 +8,7 @@ abstract class ClientState with _$ClientState {
required bool isInitialized,
required bool isLoggedIn,
required bool isVerified,
required String userId,
}) = _ClientState;
factory ClientState.fromJson(Map<String, Object?> json) =>

View file

@ -23,7 +23,7 @@ abstract class Event with _$Event {
String? transactionId,
String? redactedBy,
String? relatesTo,
String? relatesType,
@JsonKey(name: "relates_type") String? relationType,
String? decryptionError,
String? sendError,
@Default(IMap.empty()) IMap<String, int> reactions,

View file

@ -0,0 +1 @@
enum RelationType { edit, reply }

14
lib/models/report.dart Normal file
View file

@ -0,0 +1,14 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "report.freezed.dart";
part "report.g.dart";
@freezed
abstract class Report with _$Report {
const factory Report({
required String roomId,
required String eventId,
String? reason,
}) = _Report;
factory Report.fromJson(Map<String, Object?> json) => _$ReportFromJson(json);
}

View file

@ -20,7 +20,9 @@ abstract class RoomMetadata with _$RoomMetadata {
required bool hasMemberList,
@JsonKey(name: "preview_event_rowid") required int previewEventRowID,
@EpochDateTimeConverter() required DateTime sortingTimestamp,
@Default(false) bool markedUnread,
required int unreadHighlights,
required int unreadNotifications,
required int unreadMessages,
}) = _RoomMetadata;
factory RoomMetadata.fromJson(Map<String, Object?> json) =>