fix: cooldown and teams, added correct textfield hint
This commit is contained in:
@@ -184,6 +184,8 @@ class EventChannel extends ChannelModel {
|
||||
DateTime? deletedAt,
|
||||
required int memberCount,
|
||||
Map<String, Object?>? extraData,
|
||||
required int cooldown,
|
||||
String? team,
|
||||
}) : super(
|
||||
id: id,
|
||||
type: type,
|
||||
@@ -197,6 +199,8 @@ class EventChannel extends ChannelModel {
|
||||
deletedAt: deletedAt,
|
||||
memberCount: memberCount,
|
||||
extraData: extraData ?? {},
|
||||
cooldown: cooldown,
|
||||
team: team,
|
||||
);
|
||||
|
||||
/// Create a new instance from a json
|
||||
|
||||
@@ -87,5 +87,7 @@ EventChannel _$EventChannelFromJson(Map<String, dynamic> json) {
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
memberCount: json['member_count'] as int? ?? 0,
|
||||
extraData: json['extra_data'] as Map<String, dynamic>? ?? {},
|
||||
cooldown: json['cooldown'] as int? ?? 0,
|
||||
team: json['team'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -100,6 +100,9 @@ abstract class Translations {
|
||||
/// The label for write a message in [MessageInput]
|
||||
String get writeAMessageLabel;
|
||||
|
||||
/// The label for slow mode enabled in [MessageInput]
|
||||
String get slowModeOnLabel;
|
||||
|
||||
/// The label for instant commands in [MessageInput]
|
||||
String get instantCommandsLabel;
|
||||
|
||||
@@ -664,4 +667,7 @@ class DefaultTranslations implements Translations {
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'Reply to Message';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'Slow mode ON';
|
||||
}
|
||||
|
||||
@@ -835,6 +835,10 @@ class MessageInputState extends State<MessageInput> {
|
||||
if (_attachments.isNotEmpty) {
|
||||
return context.translations.addACommentOrSendLabel;
|
||||
}
|
||||
if(_timeOut != 0 && _timeOut != null) {
|
||||
return context.translations.slowModeOnLabel;
|
||||
}
|
||||
|
||||
return context.translations.writeAMessageLabel;
|
||||
}
|
||||
|
||||
|
||||
@@ -357,4 +357,7 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations {
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'Reply to Message';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'Slow mode ON';
|
||||
}
|
||||
|
||||
@@ -362,4 +362,7 @@ class StreamChatLocalizationsEs extends GlobalStreamChatLocalizations {
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'Responder al Mensaje';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'Modo lento activado';
|
||||
}
|
||||
|
||||
@@ -361,4 +361,7 @@ class StreamChatLocalizationsFr extends GlobalStreamChatLocalizations {
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'Répondre au Message';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'Mode lent activé';
|
||||
}
|
||||
|
||||
@@ -356,4 +356,7 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations {
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'संदेश का जवाब';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'स्लो मोड चालू';
|
||||
}
|
||||
|
||||
@@ -358,4 +358,7 @@ Il file è troppo grande per essere caricato. Il limite è di $limitInMB MB.''';
|
||||
|
||||
@override
|
||||
String get replyToMessageLabel => 'Rispondi al messaggio';
|
||||
|
||||
@override
|
||||
String get slowModeOnLabel => 'Modalità lenta attiva';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user