Skip to content

Commit 50f0e89

Browse files
committed
chore: minor changes
1 parent 852c66f commit 50f0e89

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
10191019
PollCreated() => _onPollCreated(result.poll),
10201020
// Handle/Notify returned errors.
10211021
AttachmentPickerError() => _onAttachmentPickerError(result),
1022-
_ => () {}, // Ignore other results.
1022+
_ => Future.value(), // Ignore other results.
10231023
};
10241024
}
10251025

sample_app/lib/pages/channel_page.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,12 @@ class _ChannelPageState extends State<ChannelPage> {
176176
Channel channel,
177177
StreamAttachmentPickerResult result,
178178
) {
179-
// Notify that the result was not handled.
180-
if (result is! LocationPicked) return false;
179+
if (result is LocationPicked) {
180+
_onShareLocationPicked(channel, result.location).ignore();
181+
return true; // Notify that the result was handled.
182+
}
181183

182-
_onShareLocationPicked(channel, result.location).ignore();
183-
return true; // Notify that the result was handled.
184+
return false; // Notify that the result was not handled.
184185
}
185186

186187
Future<SendMessageResponse> _onShareLocationPicked(

0 commit comments

Comments
 (0)