forked from eatvio/eatvio_app
feat(video_calls): fixed online indicator and in app notifications for video call
This commit is contained in:
@@ -524,14 +524,16 @@ class VideoCallManager {
|
||||
if (_recordingOverlayScheduled) return;
|
||||
final ctx = _navigatorContext;
|
||||
if (ctx == null) return;
|
||||
_recordingOverlayScheduled = true;
|
||||
VideoCallTopOverlay.insertBanner(
|
||||
final shown = VideoCallTopOverlay.insertBanner(
|
||||
ctx,
|
||||
message: S.of(ctx).video_call_recording_notice,
|
||||
backgroundColor: appTheme.videoCallNoticeBannerBackground,
|
||||
svgAsset: VideoCallTopOverlay.warningSvg,
|
||||
autoRemoveAfter: const Duration(seconds: 3),
|
||||
);
|
||||
).mounted;
|
||||
if (shown) {
|
||||
_recordingOverlayScheduled = true;
|
||||
}
|
||||
}
|
||||
|
||||
String resolvedLocalDisplayName() {
|
||||
@@ -804,13 +806,18 @@ class VideoCallManager {
|
||||
final bad =
|
||||
q == lk.ConnectionQuality.poor || q == lk.ConnectionQuality.lost;
|
||||
if (bad) {
|
||||
if (_poorConnectionEntry != null) return;
|
||||
_poorConnectionEntry = VideoCallTopOverlay.insertBanner(
|
||||
final existing = _poorConnectionEntry;
|
||||
if (existing != null && existing.mounted) return;
|
||||
_poorConnectionEntry = null;
|
||||
final entry = VideoCallTopOverlay.insertBanner(
|
||||
ctx,
|
||||
message: S.of(ctx).video_call_poor_connection,
|
||||
backgroundColor: appTheme.strongRed,
|
||||
svgAsset: VideoCallTopOverlay.poorConnectionSvg,
|
||||
);
|
||||
if (entry.mounted) {
|
||||
_poorConnectionEntry = entry;
|
||||
}
|
||||
} else {
|
||||
final e = _poorConnectionEntry;
|
||||
if (e != null && e.mounted) {
|
||||
|
||||
Reference in New Issue
Block a user