feat: remove after save

This commit is contained in:
My-Responsitories
2025-08-21 20:48:04 +08:00
committed by bggRGjQaUbCoE
parent f50965862d
commit 47ad1adfdc
6 changed files with 81 additions and 57 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
import 'package:PiliPlus/grpc/bilibili/app/im/v1.pbenum.dart'
show IMSettingType, ThreeDotItemType;
@@ -210,6 +212,14 @@ extension ThreeDotItemTypeExt on ThreeDotItemType {
}
}
extension FileExt on File {
void delSync({bool recursive = false}) {
try {
deleteSync(recursive: recursive);
} catch (_) {}
}
}
extension SizeExt on Size {
bool get isPortrait => width < 600 || height >= width;
}