Prechádzať zdrojové kódy

[fit]无照片增加提示

云天逵 9 mesiacov pred
rodič
commit
0365969dbc

+ 4 - 0
lib/module/calendar/calendar_month_controller.dart

@@ -51,6 +51,10 @@ class CalendarMonthController extends BaseController {
   }
 
   clickDelete() async {
+    if (photoGroup.value.selectedPhotosIds.isEmpty) {
+      ToastUtil.show('Please select the picture');
+      return;
+    }
     debugPrint('CalendarMonthController clickDelete');
     if (userRepository.isVip()) {
       if (photoGroup.value.selectedPhotosIds.isNotEmpty) {

+ 4 - 0
lib/module/calendar/preview/calendar_preview_controller.dart

@@ -198,6 +198,10 @@ class CalendarPreviewController extends BaseController
   }
 
   clickDelete() async {
+    if (photoGroup.value.selectedPhotosIds.isEmpty) {
+      ToastUtil.show('Please select the picture');
+      return;
+    }
     EventHandler.report(EventId.event_04004);
     debugPrint('CalendarPreviewController clickDelete');
     if (userRepository.isVip()) {

+ 4 - 0
lib/module/calendar/selected_preview/calendar_selected_preview_controller.dart

@@ -77,6 +77,10 @@ class CalendarSelectedPreviewController extends BaseController {
   }
 
   clickDelete() async {
+    if (photoGroup.value.selectedPhotosIds.isEmpty) {
+      ToastUtil.show('Please select the picture');
+      return;
+    }
     EventHandler.report(EventId.event_04004);
     debugPrint('CalendarSelectedPreviewController clickDelete');
     if (userRepository.isVip()) {

+ 4 - 0
lib/module/photo_preview/photo_preview_controller.dart

@@ -365,6 +365,10 @@ class PhotoPreviewController extends BaseController
 
   clickDelete() async {
     print('clickDelete');
+    if (selectedPhotosIds.isEmpty) {
+      ToastUtil.show('Please select the picture');
+      return;
+    }
     EventHandler.report(EventId.event_04004);
     if (userRepository.isVip()) {
       switch (photosType) {

+ 4 - 0
lib/module/photo_preview/photo_selected_preview_controller.dart

@@ -85,6 +85,10 @@ class PhotoSelectedPreviewController extends BasePhotoController {
 
   @override
   void clickDelete() async {
+    if (selectedPhotosIds.isEmpty) {
+      ToastUtil.show('Please select the picture');
+      return;
+    }
     EventHandler.report(EventId.event_04006);
     if (userRepository.isVip()) {
       if (selectedPhotosIds.isNotEmpty) {

+ 1 - 1
lib/module/similar_photo/similar_photo_view.dart

@@ -441,7 +441,7 @@ class SimilarPhotoPage extends BasePage<SimilarPhotoController> {
               ),
               child: Center(
                 child: Obx(() => Text(
-                      'Move ${controller.photoGroups.firstWhere((g) => g.images.toSet().containsAll(imagesList)).selectedImages.where((element) => element).length} to trash',
+                      'Move ${controller.getGroupByImages(imagesList).selectedImages.where((e) => e).length} to trash',
                       style: TextStyle(
                         color: Colors.white,
                         fontSize: 16.sp,