Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] revoke chromecast sessions before starting a new cast

Priyanshu Dangare8665f6dc3f36
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index 24da3d6535..e02983811a 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -755,7 +755,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
AlbumPopupAction.castAlbum,
strings.castAlbum,
galleryAppBarMenuIcon(
- castService.getActiveSessions().isNotEmpty
+ !flagService.enableMultiCast &&
+ castService.getActiveSessions().isNotEmpty
? HugeIcons.strokeRoundedTvSmart
: HugeIcons.strokeRoundedTv02,
iconColor,
@@ -1162,6 +1163,8 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
}
// stop any existing cast session
gw.revokeAllTokens().ignore();
+ } else {
+ await castService.closeActiveCasts();
}
if (!Platform.isAndroid && !kDebugMode) {