mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 17:26:18 +01:00
Remove delete button from detail pane
This commit is contained in:
parent
8f8b5c2319
commit
9fc08aa5ec
1 changed files with 0 additions and 30 deletions
|
@ -24,7 +24,6 @@ import 'package:nc_photos/platform/features.dart' as features;
|
||||||
import 'package:nc_photos/platform/k.dart' as platform_k;
|
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||||
import 'package:nc_photos/snack_bar_manager.dart';
|
import 'package:nc_photos/snack_bar_manager.dart';
|
||||||
import 'package:nc_photos/theme.dart';
|
import 'package:nc_photos/theme.dart';
|
||||||
import 'package:nc_photos/use_case/remove.dart';
|
|
||||||
import 'package:nc_photos/use_case/update_album.dart';
|
import 'package:nc_photos/use_case/update_album.dart';
|
||||||
import 'package:nc_photos/use_case/update_property.dart';
|
import 'package:nc_photos/use_case/update_property.dart';
|
||||||
import 'package:nc_photos/widget/album_picker_dialog.dart';
|
import 'package:nc_photos/widget/album_picker_dialog.dart';
|
||||||
|
@ -128,11 +127,6 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
||||||
label: L10n.of(context).archiveTooltip,
|
label: L10n.of(context).archiveTooltip,
|
||||||
onPressed: () => _onArchivePressed(context),
|
onPressed: () => _onArchivePressed(context),
|
||||||
),
|
),
|
||||||
_DetailPaneButton(
|
|
||||||
icon: Icons.delete_outline,
|
|
||||||
label: L10n.of(context).deleteTooltip,
|
|
||||||
onPressed: () => _onDeletePressed(context),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -323,30 +317,6 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onDeletePressed(BuildContext context) async {
|
|
||||||
_log.info("[_onDeletePressed] Delete file: ${widget.file.path}");
|
|
||||||
await _onAction(
|
|
||||||
context,
|
|
||||||
L10n.of(context).deleteProcessingNotification,
|
|
||||||
L10n.of(context).deleteSuccessNotification,
|
|
||||||
() async {
|
|
||||||
final fileRepo = FileRepo(FileCachedDataSource());
|
|
||||||
final albumRepo = AlbumRepo(AlbumCachedDataSource());
|
|
||||||
try {
|
|
||||||
await Remove(fileRepo, albumRepo)(widget.account, widget.file);
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
} catch (e, stackTrace) {
|
|
||||||
_log.shout(
|
|
||||||
"[_onUnarchivePressed] Failed while archiving file" +
|
|
||||||
(kDebugMode ? ": ${widget.file.path}" : ""),
|
|
||||||
e,
|
|
||||||
stackTrace);
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _onMapTap() {
|
void _onMapTap() {
|
||||||
if (platform_k.isAndroid) {
|
if (platform_k.isAndroid) {
|
||||||
final intent = AndroidIntent(
|
final intent = AndroidIntent(
|
||||||
|
|
Loading…
Reference in a new issue