fix(llc): Fix unread count not updating when the current user is set.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -17,7 +17,7 @@ class OwnUser extends User {
|
||||
this.devices = const [],
|
||||
this.mutes = const [],
|
||||
this.totalUnreadCount = 0,
|
||||
this.unreadChannels,
|
||||
this.unreadChannels = 0,
|
||||
this.channelMutes = const [],
|
||||
required String id,
|
||||
String? role,
|
||||
@@ -151,8 +151,8 @@ class OwnUser extends User {
|
||||
final int totalUnreadCount;
|
||||
|
||||
/// Total unread channels by the user.
|
||||
@JsonKey(includeIfNull: false)
|
||||
final int? unreadChannels;
|
||||
@JsonKey(includeIfNull: false, defaultValue: 0)
|
||||
final int unreadChannels;
|
||||
|
||||
/// Known top level fields.
|
||||
///
|
||||
|
||||
@@ -17,7 +17,7 @@ OwnUser _$OwnUserFromJson(Map<String, dynamic> json) {
|
||||
.toList() ??
|
||||
[],
|
||||
totalUnreadCount: json['total_unread_count'] as int? ?? 0,
|
||||
unreadChannels: json['unread_channels'] as int?,
|
||||
unreadChannels: json['unread_channels'] as int? ?? 0,
|
||||
channelMutes: (json['channel_mutes'] as List<dynamic>?)
|
||||
?.map((e) => Mute.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
|
||||
Reference in New Issue
Block a user