diff --git a/lib/ui/app/history_drawer.dart b/lib/ui/app/history_drawer.dart index ebd7f5e2e..158b0ada4 100644 --- a/lib/ui/app/history_drawer.dart +++ b/lib/ui/app/history_drawer.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:invoiceninja_flutter/constants.dart'; @@ -190,13 +192,14 @@ class _HistoryListTileState extends State { entityType: history.entityType); }, onLongPress: () { - if (state.prefState.isHistoryFloated) { - Navigator.pop(context); - } showEntityActionsDialog( context: context, entities: [entity], client: state.clientState.map[clientId], + completer: state.prefState.isHistoryFloated + ? (Completer() + ..future.then((value) => Navigator.pop(context))) + : null, ); }, ),