From 3b1ccf40a20f18264d2f0c4ed77df58e1747d992 Mon Sep 17 00:00:00 2001 From: Vivian Li Date: Mon, 8 Jul 2024 10:46:49 -0400 Subject: [PATCH] update users to show username --- .../main/java/org/ole/planet/myplanet/model/RealmUserModel.kt | 4 +--- .../java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/model/RealmUserModel.kt b/app/src/main/java/org/ole/planet/myplanet/model/RealmUserModel.kt index 451265b823..9d7fb5dca2 100644 --- a/app/src/main/java/org/ole/planet/myplanet/model/RealmUserModel.kt +++ b/app/src/main/java/org/ole/planet/myplanet/model/RealmUserModel.kt @@ -67,8 +67,6 @@ open class RealmUserModel : RealmObject() { @JvmField var birthPlace: String? = null @JvmField - var communityName: String? = null - @JvmField var userImage: String? = null @JvmField var key: String? = null @@ -172,7 +170,7 @@ open class RealmUserModel : RealmObject() { } override fun toString(): String { - return "$firstName $lastName" + return "$name" } companion object { diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt b/app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt index 8a979e97ad..4762198578 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt @@ -5,6 +5,7 @@ import android.graphics.drawable.AnimationDrawable import android.os.* import android.os.Build.VERSION_CODES.TIRAMISU import android.text.* +import android.util.Log import android.view.* import android.view.inputmethod.EditorInfo import android.widget.* @@ -259,7 +260,7 @@ class LoginActivity : SyncActivity(), TeamListAdapter.OnItemClickListener { if (selectedTeamId?.isNotEmpty() == true) { users = RealmMyTeam.getUsers(selectedTeamId, mRealm, "") val userList = (users as? MutableList)?.map { - User(it.getFullName(), it.name ?: "", "", it.userImage ?: "", "team") + User(it.name ?: "", it.name ?: "", "", it.userImage ?: "", "team") } ?: emptyList() val existingUsers = prefData.getSAVEDUSERS().toMutableList()