mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:15:09 +00:00
Fix Quick account switching
This commit is contained in:
parent
c23ef77770
commit
71bd195c62
1 changed files with 3 additions and 3 deletions
|
@ -76,7 +76,7 @@ class ChatPageWithRoom extends StatefulWidget {
|
|||
}
|
||||
|
||||
class ChatController extends State<ChatPageWithRoom> {
|
||||
Room get room => widget.room;
|
||||
Room get room => sendingClient.getRoomById(roomId) ?? widget.room;
|
||||
|
||||
late Client sendingClient;
|
||||
|
||||
|
@ -368,7 +368,7 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
TextEditingController sendController = TextEditingController();
|
||||
|
||||
void setSendingClient(Client c) {
|
||||
// first cancle typing with the old sending client
|
||||
// first cancel typing with the old sending client
|
||||
if (currentlyTyping) {
|
||||
// no need to have the setting typing to false be blocking
|
||||
typingCoolDown?.cancel();
|
||||
|
@ -393,7 +393,7 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
|
||||
final commandMatch = RegExp(r'^\/(\w+)').firstMatch(sendController.text);
|
||||
if (commandMatch != null &&
|
||||
!room.client.commands.keys.contains(commandMatch[1]!.toLowerCase())) {
|
||||
!sendingClient.commands.keys.contains(commandMatch[1]!.toLowerCase())) {
|
||||
final l10n = L10n.of(context)!;
|
||||
final dialogResult = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
|
|
Loading…
Reference in a new issue