view: leave on last item removal when opened with directory context
This commit is contained in:
parent
529bd6b0e4
commit
2fd9ccb6d3
1 changed files with 6 additions and 3 deletions
|
@ -459,11 +459,14 @@ class _EntryViewerStackState extends State<EntryViewerStack> with FeedbackMixin,
|
|||
if (hasCollection) {
|
||||
final entries = collection!.sortedEntries;
|
||||
entries.remove(entry);
|
||||
if (entries.isEmpty) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
if (entries.isNotEmpty) {
|
||||
_onCollectionChange();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Navigator.canPop(context)) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
// leave viewer
|
||||
SystemNavigator.pop();
|
||||
|
|
Loading…
Reference in a new issue