Merge branch 'master' into feature/new-ui
This commit is contained in:
@@ -67,6 +67,7 @@ class ChannelListView extends StatefulWidget {
|
||||
this.channelPreviewBuilder,
|
||||
this.separatorBuilder,
|
||||
this.errorBuilder,
|
||||
this.emptyBuilder,
|
||||
this.onImageTap,
|
||||
this.swipeToAction = false,
|
||||
this.pullToRefresh = true,
|
||||
@@ -78,6 +79,9 @@ class ChannelListView extends StatefulWidget {
|
||||
/// If true a default swipe to action behaviour will be added to this widget
|
||||
final bool swipeToAction;
|
||||
|
||||
/// The builder used when the channel list is empty.
|
||||
final WidgetBuilder emptyBuilder;
|
||||
|
||||
/// The query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
@@ -239,7 +243,11 @@ class _ChannelListViewState extends State<ChannelListView>
|
||||
|
||||
final channels = snapshot.data;
|
||||
|
||||
if (channels.isEmpty) {
|
||||
if (channels.isEmpty && widget.emptyBuilder != null) {
|
||||
return widget.emptyBuilder(context);
|
||||
}
|
||||
|
||||
if (channels.isEmpty && widget.emptyBuilder == null) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, viewportConstraints) {
|
||||
return SingleChildScrollView(
|
||||
|
||||
@@ -445,7 +445,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
return 'Search GIFs';
|
||||
}
|
||||
if (_attachments.isNotEmpty) {
|
||||
return 'Add a command or send';
|
||||
return 'Add a comment or send';
|
||||
}
|
||||
return 'Write a message';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user