|
@@ -19,6 +19,7 @@ import 'package:get/get.dart';
|
|
|
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
|
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
|
|
|
|
|
|
|
import '../../data/consts/event_report_id.dart';
|
|
import '../../data/consts/event_report_id.dart';
|
|
|
|
|
+import '../../utils/file_size_calculator_util.dart';
|
|
|
import '../photo_preview/phtoto_selected_preview_view.dart';
|
|
import '../photo_preview/phtoto_selected_preview_view.dart';
|
|
|
|
|
|
|
|
class SimilarPhotoController extends BasePhotoController {
|
|
class SimilarPhotoController extends BasePhotoController {
|
|
@@ -70,6 +71,15 @@ class SimilarPhotoController extends BasePhotoController {
|
|
|
|
|
|
|
|
// 检查删除成功的图片数量
|
|
// 检查删除成功的图片数量
|
|
|
if (result.length == selectedImages.length) {
|
|
if (result.length == selectedImages.length) {
|
|
|
|
|
+ int singleSelectSize = 0;
|
|
|
|
|
+ FileSizeCalculatorUtil.calculateTotalSize(
|
|
|
|
|
+ assetIds: result.toSet(),
|
|
|
|
|
+ updateValue: (double totalSize) {
|
|
|
|
|
+ singleSelectSize = (totalSize * 1024).toInt();
|
|
|
|
|
+ });
|
|
|
|
|
+ ImagePickerUtil.similarPhotosSize.value =
|
|
|
|
|
+ (ImagePickerUtil.similarPhotosSize.value -
|
|
|
|
|
+ singleSelectSize );
|
|
|
// 先删除该组的图片,再更新selectedImages和selectedPhotosIds
|
|
// 先删除该组的图片,再更新selectedImages和selectedPhotosIds
|
|
|
List<AssetEntity> imagesToRemove = [];
|
|
List<AssetEntity> imagesToRemove = [];
|
|
|
List<int> indexesToRemove = [];
|
|
List<int> indexesToRemove = [];
|
|
@@ -120,6 +130,7 @@ class SimilarPhotoController extends BasePhotoController {
|
|
|
StorePage.start();
|
|
StorePage.start();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
void clickJumpSelect() {
|
|
void clickJumpSelect() {
|
|
|
if (selectedPhotosIds.isEmpty) {
|
|
if (selectedPhotosIds.isEmpty) {
|
|
|
ToastUtil.show('Please select the picture');
|
|
ToastUtil.show('Please select the picture');
|
|
@@ -129,12 +140,14 @@ class SimilarPhotoController extends BasePhotoController {
|
|
|
EventHandler.report(EventId.event_04005);
|
|
EventHandler.report(EventId.event_04005);
|
|
|
PhotoSelectedPreviewPage.start(PhotosType.similarPhotos, selectedPhotosIds);
|
|
PhotoSelectedPreviewPage.start(PhotosType.similarPhotos, selectedPhotosIds);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@override
|
|
@override
|
|
|
void onReady() {
|
|
void onReady() {
|
|
|
// TODO: implement onReady
|
|
// TODO: implement onReady
|
|
|
super.onReady();
|
|
super.onReady();
|
|
|
EventHandler.report(EventId.event_03006);
|
|
EventHandler.report(EventId.event_03006);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@override
|
|
@override
|
|
|
PhotosType getPhotosType() => PhotosType.similarPhotos;
|
|
PhotosType getPhotosType() => PhotosType.similarPhotos;
|
|
|
}
|
|
}
|