From 091cc83615da0822f7dc9257bf24d1a874fcd6a0 Mon Sep 17 00:00:00 2001 From: Vivian Li <112584985+strawberrybread@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:00:29 -0400 Subject: [PATCH] login: show members username (fixes #3787) (#3788) Co-authored-by: Gideon Okuro Co-authored-by: dogi --- app/build.gradle | 4 ++-- .../main/java/org/ole/planet/myplanet/model/RealmUserModel.kt | 4 +--- .../java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d4bf5b9ceb..f681b3144a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1662 - versionName "0.16.62" + versionCode 1663 + versionName "0.16.63" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true 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..b29fabd589 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 @@ -259,7 +259,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()