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
This commit is contained in:
duggalsu 2020-09-14 08:39:46 +00:00 committed by GitHub
parent a6673a6eb2
commit 17b7abb537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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