load replies at render time

This commit is contained in:
Henry Hiles 2026-03-19 11:26:00 -04:00
commit 62f8e675a4
No known key found for this signature in database
9 changed files with 208 additions and 124 deletions

View file

@ -6,6 +6,7 @@ part "message_config.g.dart";
@freezed
abstract class MessageConfig with _$MessageConfig {
const MessageConfig._();
const factory MessageConfig({
@Default(false) bool alwaysReturn,
@Default(false) bool includeEdits,
@ -13,6 +14,15 @@ abstract class MessageConfig with _$MessageConfig {
required Event event,
}) = _MessageConfig;
@override
bool operator ==(Object other) =>
other.runtimeType == runtimeType &&
other is MessageConfig &&
other.event.eventId == event.eventId;
@override
int get hashCode => Object.hash(runtimeType, event.eventId);
factory MessageConfig.fromJson(Map<String, Object?> json) =>
_$MessageConfigFromJson(json);
}

View file

@ -18,6 +18,15 @@ abstract class GetEventRequest with _$GetEventRequest {
"unredact": unredact,
};
@override
bool operator ==(Object other) =>
other.runtimeType == runtimeType &&
other is GetEventRequest &&
other.eventId == eventId;
@override
int get hashCode => Object.hash(runtimeType, eventId);
factory GetEventRequest.fromJson(Map<String, Object?> json) =>
_$GetEventRequestFromJson(json);
}