feat(video_calls): fixed online indicator and in app notifications for video call

This commit is contained in:
misha
2026-06-24 08:26:16 +03:00
parent 8ff826fa3e
commit c5bf5acfe7
22 changed files with 569 additions and 51 deletions

View File

@@ -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) {