mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
fix: Stop typing when switching sending client
This commit is contained in:
parent
396a433cae
commit
d647d8cc64
@ -225,9 +225,18 @@ class ChatController extends State<Chat> {
|
|||||||
|
|
||||||
TextEditingController sendController = TextEditingController();
|
TextEditingController sendController = TextEditingController();
|
||||||
|
|
||||||
void setSendingClient(Client c) => setState(() {
|
void setSendingClient(Client c) {
|
||||||
sendingClient = c;
|
// first cancle typing with the old sending client
|
||||||
});
|
if (currentlyTyping) {
|
||||||
|
// no need to have the setting typing to false be blocking
|
||||||
|
typingCoolDown?.cancel();
|
||||||
|
typingCoolDown = null;
|
||||||
|
room.setTyping(false);
|
||||||
|
currentlyTyping = false;
|
||||||
|
}
|
||||||
|
// then set the new sending client
|
||||||
|
setState(() => sendingClient = c);
|
||||||
|
}
|
||||||
|
|
||||||
void setActiveClient(Client c) => setState(() {
|
void setActiveClient(Client c) => setState(() {
|
||||||
Matrix.of(context).setActiveClient(c);
|
Matrix.of(context).setActiveClient(c);
|
||||||
|
Loading…
Reference in New Issue
Block a user