Skip to content

Commit

Permalink
Do not wait for trips before dismissing bus dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes authored and limwa committed Oct 4, 2023
1 parent aabb145 commit 59558fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions uni/lib/view/bus_stop_selection/widgets/bus_stop_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class BusStopSearch extends SearchDelegate<String> {
child: Text(S.of(context).confirm),
onPressed: () async {
if (stopData!.configuredBuses.isNotEmpty) {
await Provider.of<BusStopProvider>(context, listen: false)
.addUserBusStop(stopCode!, stopData!);
if (context.mounted) Navigator.pop(context);
unawaited(
Provider.of<BusStopProvider>(context, listen: false)
.addUserBusStop(stopCode!, stopData!),
);
Navigator.pop(context);
}
},
)
Expand Down

0 comments on commit 59558fc

Please sign in to comment.