Deprecated disable emoji suggestions flag in favour of enableEmojiSuggestions

This commit is contained in:
Ayush Shekhar
2022-05-06 16:25:05 +05:30
parent b2f0a25bb0
commit 5c4ddf5c2d
2 changed files with 9 additions and 5 deletions
+1 -4
View File
@@ -3,10 +3,7 @@
✅ Added ✅ Added
- [[#1119]](https://github.com/GetStream/stream-chat-flutter/issues/1119) Added an option to disable mentions overlay in `StreamMessageInput` - [[#1119]](https://github.com/GetStream/stream-chat-flutter/issues/1119) Added an option to disable mentions overlay in `StreamMessageInput`
- Deprecated `disableEmojiSuggestionsOverlay` in favor of `enableEmojiSuggestionsOverlay` in `StreamMessageInput`
🛑️ Breaking Changes
- Replaced `disableEmojiSuggestionsOverlay` with `enableEmojiSuggestionsOverlay` in `StreamMessageInput`
🐞 Fixed 🐞 Fixed
@@ -208,6 +208,7 @@ class StreamMessageInput extends StatefulWidget {
this.elevation, this.elevation,
this.shadow, this.shadow,
this.autoCorrect = true, this.autoCorrect = true,
this.disableEmojiSuggestionsOverlay = false,
this.enableEmojiSuggestionsOverlay = true, this.enableEmojiSuggestionsOverlay = true,
this.enableMentionsOverlay = true, this.enableMentionsOverlay = true,
}) : super(key: key); }) : super(key: key);
@@ -330,6 +331,11 @@ class StreamMessageInput extends StatefulWidget {
/// autoCorrect is enabled by default /// autoCorrect is enabled by default
final bool autoCorrect; final bool autoCorrect;
/// Disable the default emoji
/// Enabled by default
@Deprecated('Please use enableEmojiSuggestionsOverlay')
final bool disableEmojiSuggestionsOverlay;
/// Disable the default emoji suggestions by passing `false` /// Disable the default emoji suggestions by passing `false`
/// Enabled by default /// Enabled by default
final bool enableEmojiSuggestionsOverlay; final bool enableEmojiSuggestionsOverlay;
@@ -598,7 +604,8 @@ class StreamMessageInputState extends State<StreamMessageInput>
visible: _showCommandsOverlay, visible: _showCommandsOverlay,
widget: _buildCommandsOverlayEntry(), widget: _buildCommandsOverlayEntry(),
), ),
if (widget.enableEmojiSuggestionsOverlay) if (widget.enableEmojiSuggestionsOverlay &&
!widget.disableEmojiSuggestionsOverlay)
OverlayOptions( OverlayOptions(
visible: _focusNode.hasFocus && visible: _focusNode.hasFocus &&
_effectiveController.text.isNotEmpty && _effectiveController.text.isNotEmpty &&