fix: analysis
This commit is contained in:
@@ -318,7 +318,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
late DateTime? _cooldownStartedAt;
|
late DateTime? _cooldownStartedAt;
|
||||||
int? _timeOut;
|
int? _timeOut;
|
||||||
|
|
||||||
Timer? slowModeTimer;
|
Timer? _slowModeTimer;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -361,7 +361,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
StreamChannel.of(context).channel.cooldown!) {
|
StreamChannel.of(context).channel.cooldown!) {
|
||||||
_timeOut = StreamChannel.of(context).channel.cooldown! -
|
_timeOut = StreamChannel.of(context).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) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
} else {
|
} else {
|
||||||
@@ -2267,7 +2267,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
_emojiOverlay?.remove();
|
_emojiOverlay?.remove();
|
||||||
_mentionsOverlay?.remove();
|
_mentionsOverlay?.remove();
|
||||||
_keyboardListener?.cancel();
|
_keyboardListener?.cancel();
|
||||||
slowModeTimer?.cancel();
|
_slowModeTimer?.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user