set default emoji only when status icon is null

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-09-26 16:28:31 +02:00
parent 1347ec29c4
commit 25846fe23f
No known key found for this signature in database
GPG key ID: F7AA2A8B65B50220
3 changed files with 6 additions and 7 deletions

View file

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

View file

@ -176,7 +176,9 @@ class SetStatusDialogFragment :
setupGeneralStatusOptions()
binding.emoji.setText(getString(R.string.default_emoji))
if (currentStatus?.icon == null) {
binding.emoji.setText(getString(R.string.default_emoji))
}
binding.clearStatus.setOnClickListener { clearStatus() }
binding.setStatus.setOnClickListener { setStatusMessage() }

View file

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