Skip to content

Commit

Permalink
fix(ui): be lenient when calling nullable onThreadTap method
Browse files Browse the repository at this point in the history
  • Loading branch information
esarbanis committed Feb 20, 2024
1 parent 35d338e commit 287567c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

🐞 Fixed
- Removed double focus on `StreamMessageInput` when `focusNode` is provided for web and desktop.
- Optionally call `onThreadTap` in `BottomRow` to avoid `Null check operator used on a null value`


## 7.0.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class BottomRow extends StatelessWidget {
final channel = StreamChannel.of(context);
message = await channel.getMessage(message.parentId!);
}
return onThreadTap!(message);
return onThreadTap?.call(message);

Check warning on line 172 in packages/stream_chat_flutter/lib/src/message_widget/bottom_row.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat_flutter/lib/src/message_widget/bottom_row.dart#L172

Added line #L172 was not covered by tests
} catch (e, stk) {
debugPrint('Error while fetching message: $e, $stk');
}
Expand Down

0 comments on commit 287567c

Please sign in to comment.