Skip to content

Commit

Permalink
teams: consistent member roles (fixes #3922) (#4201)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
rlam20 and dogi authored Aug 21, 2024
1 parent ffd3a2d commit 1690154
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1828
versionName "0.18.28"
versionCode 1829
versionName "0.18.29"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class AdapterJoinedMember(private val context: Context, private val list: List<R
.placeholder(R.drawable.profile)
.error(R.drawable.profile)
.into(rowJoinedUserBinding.memberImage)
if (teamLeaderId == currentUser.id) {
if (teamLeaderId == member.id) {
rowJoinedUserBinding.tvIsLeader.visibility = View.VISIBLE
rowJoinedUserBinding.tvIsLeader.text = context.getString(R.string.team_leader)
} else {
rowJoinedUserBinding.tvIsLeader.visibility = View.GONE
val isLoggedInUserTeamLeader = teamLeaderId != null && teamLeaderId == currentUser.id
val overflowMenuOptions = arrayOf(context.getString(R.string.remove), context.getString(R.string.make_leader))
checkUserAndShowOverflowMenu(position, overflowMenuOptions, isLoggedInUserTeamLeader)
}
val isLoggedInUserTeamLeader = teamLeaderId != null && teamLeaderId == currentUser.id
val overflowMenuOptions = arrayOf(context.getString(R.string.remove), context.getString(R.string.make_leader))
checkUserAndShowOverflowMenu(position, overflowMenuOptions, isLoggedInUserTeamLeader)
holder.itemView.setOnClickListener {
val activity = it.context as AppCompatActivity
val fragment = MemberDetailFragment.newInstance(
Expand Down

0 comments on commit 1690154

Please sign in to comment.