mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
Merge branch 'soru/multiaccount-typing' into 'main'
fix: Stop typing when switching sending client Closes #565 See merge request famedly/fluffychat!526
This commit is contained in:
commit
4623519997
@ -225,9 +225,18 @@ class ChatController extends State<Chat> {
|
||||
|
||||
TextEditingController sendController = TextEditingController();
|
||||
|
||||
void setSendingClient(Client c) => setState(() {
|
||||
sendingClient = c;
|
||||
});
|
||||
void setSendingClient(Client 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(() {
|
||||
Matrix.of(context).setActiveClient(c);
|
||||
|
Loading…
Reference in New Issue
Block a user