π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix native video type errors
Neeraj Gupta8fb8f3c92969
diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart b/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dartindex 624dcaa413..f7dd4ef33c 100644--- a/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart@@ -120,6 +120,7 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>});_guestViewEventSubscription =Bus.instance.on<GuestViewEvent>().listen((event) {+ if (!mounted) return;setState(() {_isGuestView = event.isGuestView;});@@ -174,7 +175,12 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>}void loadPreview({bool update = false}) async {- _setFilePathForNativePlayer(widget.playlistData!.preview.path, update);+ final previewPath = widget.playlistData?.preview.path;+ if (previewPath == null) {+ loadOriginal(update: update);+ return;+ }+ _setFilePathForNativePlayer(previewPath, update);await setVideoSource();}@@ -199,7 +205,11 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>} else {// ignore: unawaited_futuresgetFile(widget.file, isOrigin: true).then((file) {- _setFilePathForNativePlayer(file!.path, update);+ if (file == null) {+ _loadNetworkVideo(update);+ return;+ }+ _setFilePathForNativePlayer(file.path, update);if (Platform.isIOS) {_shouldClearCache = true;}@@ -732,6 +742,7 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>_filePath = url;});_setAspectRatioFromVideoProps().then((_) {+ if (!mounted) return;setState(() {});});