forked from Henry-Hiles/nexus
shows room but not really
This commit is contained in:
parent
85d96b80bc
commit
a28bced44d
23 changed files with 885 additions and 805 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
1
lib/models/relation_type.dart
Normal file
1
lib/models/relation_type.dart
Normal file
|
|
@ -0,0 +1 @@
|
|||
enum RelationType { edit, reply }
|
||||
14
lib/models/report.dart
Normal file
14
lib/models/report.dart
Normal 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);
|
||||
}
|
||||
|
|
@ -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) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue