فهرست منبع

fixed bug on loading incoming shared vidoes

ashilkn 2 سال پیش
والد
کامیت
146c1c9813
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      lib/ui/viewer/file/video_widget.dart

+ 3 - 1
lib/ui/viewer/file/video_widget.dart

@@ -6,6 +6,7 @@ import 'package:chewie/chewie.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:logging/logging.dart';
+import 'package:photos/core/configuration.dart';
 import 'package:photos/core/constants.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/services/files_service.dart';
@@ -71,7 +72,8 @@ class _VideoWidgetState extends State<VideoWidget> {
   }
 
   void _setFileSizeIfNull() {
-    if (widget.file.fileSize == null) {
+    if (widget.file.fileSize == null &&
+        widget.file.ownerID == Configuration.instance.getUserID()) {
       FilesService.instance
           .getFileSize(widget.file.uploadedFileID)
           .then((value) {