diff --git a/mobile/lib/services/preview_video_store.dart b/mobile/lib/services/preview_video_store.dart index 98637776bf..4312ad5168 100644 --- a/mobile/lib/services/preview_video_store.dart +++ b/mobile/lib/services/preview_video_store.dart @@ -46,7 +46,7 @@ class PreviewVideoStore { LinkedHashMap get previews => _items; late Set _failureFiles; - bool initSuccess = false; + bool _initSuccess = false; PreviewVideoStore._privateConstructor(); @@ -672,12 +672,12 @@ class PreviewVideoStore { } // generate stream for all files after cutoff date - Future _putFilesForPreviewCreation() async { + Future _putFilesForPreviewCreation([bool updateInit = false]) async { if (!isVideoStreamingEnabled || !await canUseHighBandwidth()) return; final cutoff = videoStreamingCutoff; if (cutoff == null) return; - initSuccess = true; + if (updateInit) _initSuccess = true; Map failureFiles = {}; try { @@ -757,9 +757,9 @@ class PreviewVideoStore { } void queueFiles() { - if (!initSuccess) { - _putFilesForPreviewCreation().catchError((_) { - initSuccess = false; + if (!_initSuccess) { + _putFilesForPreviewCreation(true).catchError((_) { + _initSuccess = false; }); } }