Replaced message input flags with positive booleans
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
- [[#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`
|
||||||
|
|
||||||
|
🛑️ Breaking Changes
|
||||||
|
|
||||||
|
- Replaced `disableEmojiSuggestionsOverlay` with `enableEmojiSuggestionsOverlay` in `StreamMessageInput`
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
- Fixed attachment picker ui.
|
- Fixed attachment picker ui.
|
||||||
|
|||||||
@@ -208,8 +208,8 @@ 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.disableMentionsOverlay = false,
|
this.enableMentionsOverlay = true,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
/// List of options for showing overlays.
|
/// List of options for showing overlays.
|
||||||
@@ -330,13 +330,13 @@ class StreamMessageInput extends StatefulWidget {
|
|||||||
/// autoCorrect is enabled by default
|
/// autoCorrect is enabled by default
|
||||||
final bool autoCorrect;
|
final bool autoCorrect;
|
||||||
|
|
||||||
/// Disable the default emoji suggestions
|
/// Disable the default emoji suggestions by passing `false`
|
||||||
/// Enabled by default
|
/// Enabled by default
|
||||||
final bool disableEmojiSuggestionsOverlay;
|
final bool enableEmojiSuggestionsOverlay;
|
||||||
|
|
||||||
/// Disable the mentions overlay
|
/// Disable the mentions overlay by passing false
|
||||||
/// Enabled by default
|
/// Enabled by default
|
||||||
final bool disableMentionsOverlay;
|
final bool enableMentionsOverlay;
|
||||||
|
|
||||||
static bool _defaultValidator(Message message) =>
|
static bool _defaultValidator(Message message) =>
|
||||||
message.text?.isNotEmpty == true || message.attachments.isNotEmpty;
|
message.text?.isNotEmpty == true || message.attachments.isNotEmpty;
|
||||||
@@ -598,7 +598,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
|||||||
visible: _showCommandsOverlay,
|
visible: _showCommandsOverlay,
|
||||||
widget: _buildCommandsOverlayEntry(),
|
widget: _buildCommandsOverlayEntry(),
|
||||||
),
|
),
|
||||||
if (!widget.disableEmojiSuggestionsOverlay)
|
if (widget.enableEmojiSuggestionsOverlay)
|
||||||
OverlayOptions(
|
OverlayOptions(
|
||||||
visible: _focusNode.hasFocus &&
|
visible: _focusNode.hasFocus &&
|
||||||
_effectiveController.text.isNotEmpty &&
|
_effectiveController.text.isNotEmpty &&
|
||||||
@@ -611,7 +611,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
|||||||
.contains(':'),
|
.contains(':'),
|
||||||
widget: _buildEmojiOverlay(),
|
widget: _buildEmojiOverlay(),
|
||||||
),
|
),
|
||||||
if (!widget.disableMentionsOverlay)
|
if (widget.enableMentionsOverlay)
|
||||||
OverlayOptions(
|
OverlayOptions(
|
||||||
visible: _showMentionsOverlay,
|
visible: _showMentionsOverlay,
|
||||||
widget: _buildMentionsOverlayEntry(),
|
widget: _buildMentionsOverlayEntry(),
|
||||||
|
|||||||
Reference in New Issue
Block a user