Browse Source

Android: Clear chat open flag on cancel or completion (#8478)

stujones11 5 years ago
parent
commit
cff1e9ca27
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/client/game.cpp

+ 4 - 0
src/client/game.cpp

@@ -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