Android: Clear chat open flag on cancel or completion (#8478)
authorstujones11 <stujones111@gmail.com>
Fri, 19 Apr 2019 10:06:47 +0000 (11:06 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 19 Apr 2019 10:06:47 +0000 (12:06 +0200)
src/client/game.cpp

index 192c899d9e2162b1adebf61bc19dc2120cf4374f..379f32949722fbb12bbb44af20b28a4b3d69ab23 100644 (file)
@@ -1880,6 +1880,9 @@ void Game::processKeyInput()
        } else if (wasKeyDown(KeyType::INVENTORY)) {
                openInventory();
        } else if (input->cancelPressed()) {
+#ifdef __ANDROID__
+               m_android_chat_open = false;
+#endif
                if (!gui_chat_console->isOpenInhibited()) {
                        showPauseMenu();
                }
@@ -2079,6 +2082,7 @@ void Game::handleAndroidChatInput()
        if (m_android_chat_open && porting::getInputDialogState() == 0) {
                std::string text = porting::getInputDialogValue();
                client->typeChatMessage(utf8_to_wide(text));
+               m_android_chat_open = false;
        }
 }
 #endif