From 33e051ae011471e3472a69d405f805319d25bd70 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sun, 16 Jan 2022 19:19:08 -0600 Subject: Hide device limit when <= 0, and show device unique ID on details view --- .../TrackerMap/android/session/UserInformationActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'androidApp/src/main/java/mx/trackermap') 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 13deed0..a3c6fd6 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 @@ -64,6 +64,12 @@ class UserInformationActivity : AppCompatActivity() { 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 + } + } } } } -- cgit v1.2.3