parent
427e06be3e
commit
a54004736b
3 changed files with 427 additions and 143 deletions
|
|
@ -8,7 +8,7 @@ part "paginate_manual.g.dart";
|
|||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const PaginateManual({
|
||||
required final IList<Event> events,
|
||||
final IList<Event> events = const .empty(),
|
||||
final IList<Event> relatedEvents = const .empty(),
|
||||
required final String? nextBatch,
|
||||
}) with _$PaginateManual {
|
||||
|
|
|
|||
21
lib/models/requests/search.dart
Normal file
21
lib/models/requests/search.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
|
||||
part "search.freezed.dart";
|
||||
part "search.g.dart";
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class const SearchRequest({
|
||||
required final String searchTerm,
|
||||
final IList<String> roomIds = const .empty(),
|
||||
final int limit = 20,
|
||||
final bool sortByTime = true,
|
||||
|
||||
final String? nextBatch,
|
||||
}) with _$SearchRequest {
|
||||
Map<String, Object?> toJson() => _$SearchRequestToJson(this);
|
||||
|
||||
factory SearchRequest.fromJson(Map<String, Object?> json) =>
|
||||
_$SearchRequestFromJson(json);
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/encryption.dart";
|
||||
import "package:nexus/models/epoch_date_time_converter.dart";
|
||||
import "package:nexus/models/lazy_load_summary.dart";
|
||||
|
||||
|
|
@ -15,6 +16,8 @@ class const RoomMetadata({
|
|||
final String? topic,
|
||||
final String? canonicalAlias,
|
||||
final LazyLoadSummary? lazyLoadSummary,
|
||||
|
||||
final EncryptionContent? encryptionEvent,
|
||||
required final bool hasMemberList,
|
||||
@JsonKey(name: "preview_event_rowid") required final int previewEventRowID,
|
||||
@EpochDateTimeConverter() required final DateTime sortingTimestamp,
|
||||
|
|
|
|||
Loading…
Reference in a new issue