From 25234fdb851d583a0609a52d3569b991bc651d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Fri, 16 Sep 2022 16:36:52 +0200 Subject: [PATCH] Rollback emoji-google to 0.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New version is not compatible with Jacoco for some reason Signed-off-by: Álvaro Brey --- app/build.gradle | 2 +- .../com/nextcloud/ui/SetStatusDialogFragment.kt | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f13b1fe5c6..c2f0a92bd6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -252,7 +252,7 @@ dependencies { } implementation 'com.caverock:androidsvg:1.4' implementation 'androidx.annotation:annotation:1.4.0' - implementation 'com.vanniktech:emoji-google:0.15.0' + implementation 'com.vanniktech:emoji-google:0.9.0' implementation "com.github.cotechde.hwsecurity:hwsecurity-fido:$fidoVersion" implementation "com.github.cotechde.hwsecurity:hwsecurity-fido2:$fidoVersion" diff --git a/app/src/main/java/com/nextcloud/ui/SetStatusDialogFragment.kt b/app/src/main/java/com/nextcloud/ui/SetStatusDialogFragment.kt index 4ea88ee52f..8caa2d0da0 100644 --- a/app/src/main/java/com/nextcloud/ui/SetStatusDialogFragment.kt +++ b/app/src/main/java/com/nextcloud/ui/SetStatusDialogFragment.kt @@ -59,8 +59,6 @@ import com.owncloud.android.utils.theme.ThemeTextInputUtils import com.vanniktech.emoji.EmojiManager import com.vanniktech.emoji.EmojiPopup import com.vanniktech.emoji.google.GoogleEmojiProvider -import com.vanniktech.emoji.installDisableKeyboardInput -import com.vanniktech.emoji.installForceSingleEmoji import java.util.Calendar import java.util.Locale import javax.inject.Inject @@ -171,18 +169,18 @@ class SetStatusDialogFragment : binding.setStatus.setOnClickListener { setStatusMessage() } binding.emoji.setOnClickListener { popup.show() } - popup = EmojiPopup( - view, binding.emoji, - onEmojiClickListener = { + popup = EmojiPopup.Builder + .fromRootView(view) + .setOnEmojiClickListener { _, _ -> popup.dismiss() binding.emoji.clearFocus() val imm: InputMethodManager = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager imm.hideSoftInputFromWindow(binding.emoji.windowToken, 0) } - ) - binding.emoji.installDisableKeyboardInput(popup) - binding.emoji.installForceSingleEmoji() + .build(binding.emoji) + binding.emoji.disableKeyboardInput(popup) + binding.emoji.forceSingleEmoji() val adapter = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_item) adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)