minor tweaks & cleanup

This commit is contained in:
David Zhao
2021-08-04 22:52:16 -07:00
parent 86fc303e61
commit 8cd7546d2f
4 changed files with 54 additions and 42 deletions
+3 -3
View File
@@ -65,7 +65,7 @@ class Participant extends ChangeNotifier {
DateTime get joinedAt {
var pi = _participantInfo;
if (pi != null) {
return DateTime.fromMillisecondsSinceEpoch((pi.joinedAt as int) * 1000,
return DateTime.fromMillisecondsSinceEpoch(pi.joinedAt.toInt() * 1000,
isUtc: true);
}
return DateTime.now();
@@ -82,9 +82,9 @@ class Participant extends ChangeNotifier {
return audioTracks.values.first.muted;
}
bool get hasAudio => audioTracks.length > 0;
bool get hasAudio => audioTracks.isNotEmpty;
bool get hasVideo => videoTracks.length > 0;
bool get hasVideo => videoTracks.isNotEmpty;
/// tracks that are subscribed to
List<TrackPublication> get subscribedTracks {