Neeraj Gupta 2 anos atrás
pai
commit
fa4156a358

+ 2 - 2
lib/ui/viewer/file/detail_page.dart

@@ -110,7 +110,7 @@ class _DetailPageState extends State<DetailPage> {
     return Scaffold(
       appBar: FadingAppBar(
         _files[_selectedIndex],
-        _onFileDeleted,
+        _onFileRemoved,
         Configuration.instance.getUserID(),
         100,
         widget.config.mode == DetailPageMode.full,
@@ -251,7 +251,7 @@ class _DetailPageState extends State<DetailPage> {
     }
   }
 
-  Future<void> _onFileDeleted(File file) async {
+  Future<void> _onFileRemoved(File file) async {
     final totalFiles = _files.length;
     if (totalFiles == 1) {
       // Deleted the only file

+ 5 - 5
lib/ui/viewer/file/fading_app_bar.dart

@@ -34,14 +34,14 @@ import 'package:photos/utils/toast_util.dart';
 
 class FadingAppBar extends StatefulWidget implements PreferredSizeWidget {
   final File file;
-  final Function(File) onFileDeleted;
+  final Function(File) onFileRemoved;
   final double height;
   final bool shouldShowActions;
   final int userID;
 
   const FadingAppBar(
     this.file,
-    this.onFileDeleted,
+    this.onFileRemoved,
     this.userID,
     this.height,
     this.shouldShowActions, {
@@ -260,7 +260,7 @@ class FadingAppBarState extends State<FadingAppBar> {
       final hideResult =
           await CollectionsService.instance.hideFiles(context, [widget.file]);
       if (hideResult) {
-        widget.onFileDeleted(widget.file);
+        widget.onFileRemoved(widget.file);
       }
     } catch (e, s) {
       _logger.severe("failed to update file visibility", e, s);
@@ -352,7 +352,7 @@ class FadingAppBarState extends State<FadingAppBar> {
           onPressed: () async {
             await deleteFilesFromEverywhere(context, [file]);
             Navigator.of(context, rootNavigator: true).pop();
-            widget.onFileDeleted(file);
+            widget.onFileRemoved(file);
           },
           child: const Text("Everywhere"),
         ),
@@ -391,7 +391,7 @@ class FadingAppBarState extends State<FadingAppBar> {
           onPressed: () async {
             await deleteFilesFromEverywhere(context, [file]);
             Navigator.of(context, rootNavigator: true).pop();
-            widget.onFileDeleted(file);
+            widget.onFileRemoved(file);
           },
           child: const Text("Everywhere"),
         ),