From 17b7abb537d8214fac4b16c26c8c32ad7c3aed1e Mon Sep 17 00:00:00 2001 From: duggalsu <5505558+duggalsu@users.noreply.github.com> Date: Mon, 14 Sep 2020 08:39:46 +0000 Subject: [PATCH] Remove 'Add Data' button if all 4 metadata fields are used in Edit Profile (#1934) * Remove 'Add Data' button if all 4 metadata fields are used * Removed option for disabling add field button --- .../main/java/com/keylesspalace/tusky/EditProfileActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt index 22d25f09..a1e68ddf 100644 --- a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.kt @@ -30,6 +30,7 @@ import android.widget.ImageView import androidx.activity.viewModels import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat +import androidx.core.view.isVisible import androidx.lifecycle.LiveData import androidx.lifecycle.Observer import androidx.recyclerview.widget.LinearLayoutManager @@ -112,7 +113,7 @@ class EditProfileActivity : BaseActivity(), Injectable { addFieldButton.setOnClickListener { accountFieldEditAdapter.addField() if(accountFieldEditAdapter.itemCount >= MAX_ACCOUNT_FIELDS) { - it.isEnabled = false + it.isVisible = false } scrollView.post{