diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 19:22:39 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 19:22:39 -0600 |
commit | abcf0ba873fb28f8a8ecf773178da7b1f0f4401f (patch) | |
tree | 8feedc9058bef26b61f836e99d72eb987af2235a /androidApp/src/main | |
parent | 67b9ab757d3017e29eaf489f824c6130871c6762 (diff) | |
download | etbsa-trackermap-mobile-abcf0ba873fb28f8a8ecf773178da7b1f0f4401f.tar.gz etbsa-trackermap-mobile-abcf0ba873fb28f8a8ecf773178da7b1f0f4401f.tar.bz2 etbsa-trackermap-mobile-abcf0ba873fb28f8a8ecf773178da7b1f0f4401f.zip |
Fixed hide of device limit when device limit <= 0
Diffstat (limited to 'androidApp/src/main')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt | 8 | ||||
-rw-r--r-- | androidApp/src/main/res/layout/user_information_activity.xml | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt index a3c6fd6..dababb5 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt @@ -62,12 +62,12 @@ class UserInformationActivity : AppCompatActivity() { usernameInfo.text = user.name ?: "" emailInfo.text = user.email ?: "" idInfo.text = "${user.id ?: "--"}" - deviceLimitInfo.text = "${user.deviceLimit ?: "--"}" adminInfo.text = "${user.administrator}" user.deviceLimit?.let { - if (it <= 0) { - adminInfoLabel.visibility = View.GONE - adminInfo.visibility = View.GONE + deviceLimitInfo.text = "${user.deviceLimit ?: "--"}" + if (it > 0) { + deviceLimitInfo.visibility = View.VISIBLE + deviceLimitInfo.visibility = View.VISIBLE } } } diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml index 252505f..45e747c 100644 --- a/androidApp/src/main/res/layout/user_information_activity.xml +++ b/androidApp/src/main/res/layout/user_information_activity.xml @@ -105,6 +105,7 @@ android:id="@+id/deviceLimitInfoLabel" android:layout_width="match_parent" android:layout_height="wrap_content" + android:visibility="gone" android:text="@string/device_limit" android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> @@ -113,6 +114,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/fields_spacing" + android:visibility="gone" tools:text="Device Limit" /> <TextView |