mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-23 14:40:58 -04:00
new chat widget
This commit is contained in:
parent
063eeb8d12
commit
1a9cca0667
44 changed files with 1904 additions and 981 deletions
|
@ -15,7 +15,8 @@ T _$identity<T>(T value) => value;
|
|||
|
||||
/// @nodoc
|
||||
mixin _$MessageState implements DiagnosticableTreeMixin {
|
||||
// Content of the message
|
||||
// Sequence number of the message for display purposes
|
||||
int get seqId; // Content of the message
|
||||
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
proto.Message get content; // Sent timestamp
|
||||
Timestamp get sentTimestamp; // Reconciled timestamp
|
||||
|
@ -37,6 +38,7 @@ mixin _$MessageState implements DiagnosticableTreeMixin {
|
|||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MessageState'))
|
||||
..add(DiagnosticsProperty('seqId', seqId))
|
||||
..add(DiagnosticsProperty('content', content))
|
||||
..add(DiagnosticsProperty('sentTimestamp', sentTimestamp))
|
||||
..add(DiagnosticsProperty('reconciledTimestamp', reconciledTimestamp))
|
||||
|
@ -48,6 +50,7 @@ mixin _$MessageState implements DiagnosticableTreeMixin {
|
|||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is MessageState &&
|
||||
(identical(other.seqId, seqId) || other.seqId == seqId) &&
|
||||
(identical(other.content, content) || other.content == content) &&
|
||||
(identical(other.sentTimestamp, sentTimestamp) ||
|
||||
other.sentTimestamp == sentTimestamp) &&
|
||||
|
@ -59,12 +62,12 @@ mixin _$MessageState implements DiagnosticableTreeMixin {
|
|||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
|
||||
int get hashCode => Object.hash(runtimeType, seqId, content, sentTimestamp,
|
||||
reconciledTimestamp, sendState);
|
||||
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'MessageState(content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
||||
return 'MessageState(seqId: $seqId, content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +78,8 @@ abstract mixin class $MessageStateCopyWith<$Res> {
|
|||
_$MessageStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
{int seqId,
|
||||
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
proto.Message content,
|
||||
Timestamp sentTimestamp,
|
||||
Timestamp? reconciledTimestamp,
|
||||
|
@ -94,12 +98,17 @@ class _$MessageStateCopyWithImpl<$Res> implements $MessageStateCopyWith<$Res> {
|
|||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? seqId = null,
|
||||
Object? content = null,
|
||||
Object? sentTimestamp = null,
|
||||
Object? reconciledTimestamp = freezed,
|
||||
Object? sendState = freezed,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
seqId: null == seqId
|
||||
? _self.seqId
|
||||
: seqId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
content: null == content
|
||||
? _self.content
|
||||
: content // ignore: cast_nullable_to_non_nullable
|
||||
|
@ -121,10 +130,12 @@ class _$MessageStateCopyWithImpl<$Res> implements $MessageStateCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
@JsonSerializable()
|
||||
class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
||||
const _MessageState(
|
||||
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
{required this.seqId,
|
||||
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
required this.content,
|
||||
required this.sentTimestamp,
|
||||
required this.reconciledTimestamp,
|
||||
|
@ -132,6 +143,9 @@ class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
|||
factory _MessageState.fromJson(Map<String, dynamic> json) =>
|
||||
_$MessageStateFromJson(json);
|
||||
|
||||
// Sequence number of the message for display purposes
|
||||
@override
|
||||
final int seqId;
|
||||
// Content of the message
|
||||
@override
|
||||
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
|
@ -165,6 +179,7 @@ class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
|||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'MessageState'))
|
||||
..add(DiagnosticsProperty('seqId', seqId))
|
||||
..add(DiagnosticsProperty('content', content))
|
||||
..add(DiagnosticsProperty('sentTimestamp', sentTimestamp))
|
||||
..add(DiagnosticsProperty('reconciledTimestamp', reconciledTimestamp))
|
||||
|
@ -176,6 +191,7 @@ class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
|||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _MessageState &&
|
||||
(identical(other.seqId, seqId) || other.seqId == seqId) &&
|
||||
(identical(other.content, content) || other.content == content) &&
|
||||
(identical(other.sentTimestamp, sentTimestamp) ||
|
||||
other.sentTimestamp == sentTimestamp) &&
|
||||
|
@ -187,12 +203,12 @@ class _MessageState with DiagnosticableTreeMixin implements MessageState {
|
|||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
|
||||
int get hashCode => Object.hash(runtimeType, seqId, content, sentTimestamp,
|
||||
reconciledTimestamp, sendState);
|
||||
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'MessageState(content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
||||
return 'MessageState(seqId: $seqId, content: $content, sentTimestamp: $sentTimestamp, reconciledTimestamp: $reconciledTimestamp, sendState: $sendState)';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +221,8 @@ abstract mixin class _$MessageStateCopyWith<$Res>
|
|||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
{int seqId,
|
||||
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
|
||||
proto.Message content,
|
||||
Timestamp sentTimestamp,
|
||||
Timestamp? reconciledTimestamp,
|
||||
|
@ -225,12 +242,17 @@ class __$MessageStateCopyWithImpl<$Res>
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? seqId = null,
|
||||
Object? content = null,
|
||||
Object? sentTimestamp = null,
|
||||
Object? reconciledTimestamp = freezed,
|
||||
Object? sendState = freezed,
|
||||
}) {
|
||||
return _then(_MessageState(
|
||||
seqId: null == seqId
|
||||
? _self.seqId
|
||||
: seqId // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
content: null == content
|
||||
? _self.content
|
||||
: content // ignore: cast_nullable_to_non_nullable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue