Skip to content

Commit

Permalink
fix: 🐛 issue #261 userReactionCallback not working
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsaltanna committed Nov 1, 2024
1 parent a770f70 commit 578c74e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 51 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
dependencies
* **Fix**: [264](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/264) missing
voice_message_configuration.dart export in models.dart
* **Fix**: [261](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/261)
userReactionCallback not working

## [2.2.0]

Expand Down
101 changes: 50 additions & 51 deletions lib/src/widgets/chat_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,42 +199,41 @@ class _ChatViewState extends State<ChatView>
child: SuggestionsConfigIW(
suggestionsConfig: widget.replySuggestionsConfig,
child: Builder(builder: (context) {
return Stack(
children: [
Container(
height: chatBackgroundConfig.height ??
MediaQuery.of(context).size.height,
width: chatBackgroundConfig.width ??
MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: chatBackgroundConfig.backgroundColor ?? Colors.white,
image: chatBackgroundConfig.backgroundImage != null
? DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
chatBackgroundConfig.backgroundImage!),
)
: null,
),
padding: chatBackgroundConfig.padding,
margin: chatBackgroundConfig.margin,
child: Column(
children: [
if (widget.appBar != null) widget.appBar!,
Expanded(
child: ConfigurationsInheritedWidget(
chatBackgroundConfig: widget.chatBackgroundConfig,
reactionPopupConfig: widget.reactionPopupConfig,
typeIndicatorConfig: widget.typeIndicatorConfig,
chatBubbleConfig: widget.chatBubbleConfig,
replyPopupConfig: widget.replyPopupConfig,
messageConfig: widget.messageConfig,
profileCircleConfig: widget.profileCircleConfig,
repliedMessageConfig: widget.repliedMessageConfig,
swipeToReplyConfig: widget.swipeToReplyConfig,
emojiPickerSheetConfig: widget.emojiPickerSheetConfig,
scrollToBottomButtonConfig:
widget.scrollToBottomButtonConfig,
return ConfigurationsInheritedWidget(
chatBackgroundConfig: widget.chatBackgroundConfig,
reactionPopupConfig: widget.reactionPopupConfig,
typeIndicatorConfig: widget.typeIndicatorConfig,
chatBubbleConfig: widget.chatBubbleConfig,
replyPopupConfig: widget.replyPopupConfig,
messageConfig: widget.messageConfig,
profileCircleConfig: widget.profileCircleConfig,
repliedMessageConfig: widget.repliedMessageConfig,
swipeToReplyConfig: widget.swipeToReplyConfig,
emojiPickerSheetConfig: widget.emojiPickerSheetConfig,
scrollToBottomButtonConfig: widget.scrollToBottomButtonConfig,
child: Stack(
children: [
Container(
height: chatBackgroundConfig.height ??
MediaQuery.of(context).size.height,
width: chatBackgroundConfig.width ??
MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: chatBackgroundConfig.backgroundColor ?? Colors.white,
image: chatBackgroundConfig.backgroundImage != null
? DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
chatBackgroundConfig.backgroundImage!),
)
: null,
),
padding: chatBackgroundConfig.padding,
margin: chatBackgroundConfig.margin,
child: Column(
children: [
if (widget.appBar != null) widget.appBar!,
Expanded(
child: Stack(
children: [
if (chatViewState.isLoading)
Expand Down Expand Up @@ -301,22 +300,22 @@ class _ChatViewState extends State<ChatView>
],
),
),
),
],
),
),
if (featureActiveConfig.enableReactionPopup)
ValueListenableBuilder<bool>(
valueListenable: context.chatViewIW!.showPopUp,
builder: (_, showPopupValue, child) {
return ReactionPopup(
key: context.chatViewIW!.reactionPopupKey,
onTap: () => _onChatListTap(context),
showPopUp: showPopupValue,
);
},
],
),
),
],
if (featureActiveConfig.enableReactionPopup)
ValueListenableBuilder<bool>(
valueListenable: context.chatViewIW!.showPopUp,
builder: (_, showPopupValue, child) {
return ReactionPopup(
key: context.chatViewIW!.reactionPopupKey,
onTap: () => _onChatListTap(context),
showPopUp: showPopupValue,
);
},
),
],
),
);
}),
),
Expand Down

0 comments on commit 578c74e

Please sign in to comment.