Merge remote-tracking branch 'origin/cds-189' into cds-189

This commit is contained in:
Deven Joshi
2021-08-23 13:07:37 +05:30
2 changed files with 6 additions and 5 deletions
@@ -355,11 +355,12 @@ class MessageInputState extends State<MessageInput> {
} }
void _startSlowMode() { void _startSlowMode() {
if (StreamChannel.of(context).channel.cooldownStartedAt != null) { final channel = StreamChannel.of(context).channel;
_cooldownStartedAt = StreamChannel.of(context).channel.cooldownStartedAt; if (channel.cooldownStartedAt != null) {
_cooldownStartedAt = channel.cooldownStartedAt;
if (DateTime.now().difference(_cooldownStartedAt!).inSeconds < if (DateTime.now().difference(_cooldownStartedAt!).inSeconds <
StreamChannel.of(context).channel.cooldown!) { channel.cooldown!) {
_timeOut = StreamChannel.of(context).channel.cooldown! - _timeOut = channel.cooldown! -
DateTime.now().difference(_cooldownStartedAt!).inSeconds; DateTime.now().difference(_cooldownStartedAt!).inSeconds;
_slowModeTimer = Timer.periodic(const Duration(seconds: 1), (timer) { _slowModeTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (_timeOut == 0) { if (_timeOut == 0) {
@@ -346,5 +346,5 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations {
String get replyToMessageLabel => '메시지에 회신합니다.'; String get replyToMessageLabel => '메시지에 회신합니다.';
@override @override
String get slowModeOnLabel => '느린 모드 켜짐'; String get slowModeOnLabel => '슬로모드 켜짐';
} }