diff --git a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt index 65cd280c91..af0757c857 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt +++ b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt @@ -58,7 +58,7 @@ data class Conversation( @JsonField(name = ["actorType"]) var actorType: String = "", - var password: String? = null, //check if this can be removed.Does not belong to api response but is used internally? + var password: String? = null, // check if this can be removed.Does not belong to api response but is used internally? @JsonField(name = ["isFavorite"]) var favorite: Boolean = false, diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt index 1e8577aba3..96e6d8692c 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt @@ -22,7 +22,6 @@ import android.widget.AdapterView.OnItemSelectedListener import android.widget.ArrayAdapter import android.widget.ImageView import android.widget.TextView -import androidx.core.widget.doAfterTextChanged import androidx.fragment.app.DialogFragment import androidx.recyclerview.widget.LinearLayoutManager import autodagger.AutoInjector @@ -177,6 +176,10 @@ class SetStatusDialogFragment : setupGeneralStatusOptions() + if (currentStatus?.icon == null) { + binding.emoji.setText(getString(R.string.default_emoji)) + } + binding.clearStatus.setOnClickListener { clearStatus() } binding.setStatus.setOnClickListener { setStatusMessage() } binding.emoji.setOnClickListener { openEmojiPopup() } @@ -214,10 +217,6 @@ class SetStatusDialogFragment : viewThemeUtils.material.colorMaterialButtonPrimaryTonal(binding.setStatus) viewThemeUtils.material.colorTextInputLayout(binding.customStatusInputContainer) - - binding.customStatusInput.doAfterTextChanged { text -> - binding.setStatus.isEnabled = !text.isNullOrEmpty() - } } private fun setupCurrentStatus() { @@ -225,7 +224,6 @@ class SetStatusDialogFragment : binding.emoji.setText(it.icon) binding.customStatusInput.text?.clear() binding.customStatusInput.setText(it.message?.trim()) - binding.setStatus.isEnabled = it.message?.isEmpty() == false visualizeStatus(it.status) if (it.clearAt > 0) { diff --git a/app/src/test/java/com/nextcloud/talk/json/ConversationConversionTest.kt b/app/src/test/java/com/nextcloud/talk/json/ConversationConversionTest.kt index 1b44293b81..7508bccbfd 100644 --- a/app/src/test/java/com/nextcloud/talk/json/ConversationConversionTest.kt +++ b/app/src/test/java/com/nextcloud/talk/json/ConversationConversionTest.kt @@ -51,7 +51,7 @@ class ConversationConversionTest( val conversationEntity = conversationJson.asEntity(1) assertNotNull(conversationEntity) - val apiVersion : Int = jsonFileName.substringAfterLast("APIv").first().digitToInt() + val apiVersion: Int = jsonFileName.substringAfterLast("APIv").first().digitToInt() checkConversationEntity(conversationEntity, apiVersion) @@ -61,10 +61,7 @@ class ConversationConversionTest( checkConversationEntity(conversationEntityConvertedBack, apiVersion) } - private fun checkConversationEntity( - conversationEntity: ConversationEntity, - apiVersion: Int - ) { + private fun checkConversationEntity(conversationEntity: ConversationEntity, apiVersion: Int) { assertEquals("1@juwd77g6", conversationEntity.internalId) assertEquals(1, conversationEntity.accountId)