From 7a8759d401b93b7e679398a60670d00254e7c0d2 Mon Sep 17 00:00:00 2001 From: enoy19 Date: Fri, 2 Jun 2023 15:30:08 +0200 Subject: [PATCH] fixed newly introduced bugs this happens when you don't test before you release --- lib/ui/widget/task_search_field.dart | 16 +++++++++++----- lib/util/accumulating_stream.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/ui/widget/task_search_field.dart b/lib/ui/widget/task_search_field.dart index ee17c11..7ed61e1 100644 --- a/lib/ui/widget/task_search_field.dart +++ b/lib/ui/widget/task_search_field.dart @@ -127,7 +127,9 @@ class _TaskSearchTextFieldState extends State { ), child: WorkInterfaceIcon(origin: suggestion.origin), ), - title: Text(suggestion.displayText), + title: Text(suggestion.displayText.isNotEmpty + ? suggestion.displayText + : ''), subtitle: Text('#${suggestion.task?.id ?? ""}'), onTap: () { controller.closeView(null); @@ -141,10 +143,14 @@ class _TaskSearchTextFieldState extends State { }, ); } else { - return const ListTile( - leading: Icon(Icons.search), - title: Text('Start typing to search for a Task'), - subtitle: Text('Hint: Try \$me or #[TicketID]'), + return ListTile( + leading: const Icon(Icons.search), + title: const Text('Start typing to search for a Task'), + subtitle: const Text('Hint: Try \$me or #[TicketID]'), + onTap: () { + controller.closeView(null); + widget.onSubmitted?.call(''); + }, ); } } diff --git a/lib/util/accumulating_stream.dart b/lib/util/accumulating_stream.dart index 9d12f83..9aabab2 100644 --- a/lib/util/accumulating_stream.dart +++ b/lib/util/accumulating_stream.dart @@ -8,7 +8,7 @@ class AccumulatingStream extends Stream> { AccumulatingStream(Stream sourceStream) { _sub = sourceStream.listen((data) { _list.add(data); - _accumulatingController.add(_list); + _accumulatingController.add([..._list]); }, onError: (error) { _accumulatingController.addError(error); }, onDone: () { diff --git a/pubspec.yaml b/pubspec.yaml index cda845b..2a68b78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A time tracking and booking tool publish_to: 'none' -version: 1.4.1+7 +version: 1.4.2+8 environment: sdk: '>=3.0.0 <4.0.0'