Skip to content

Commit

Permalink
enterprises: show username when no fullname (fixes #2499) (#2504)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Sep 22, 2023
1 parent 533cf12 commit 17db610
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 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 1050
versionName "0.10.50"
versionCode 1051
versionName "0.10.51"
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 @@ -58,7 +58,11 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (holder instanceof ViewHolderUser) {
String[] overflowMenuOptions;
((ViewHolderUser) holder).tvTitle.setText(list.get(position).toString());
if (list.get(position).toString().equals(" ")) {
((ViewHolderUser) holder).tvTitle.setText(list.get(position).getName());
} else {
((ViewHolderUser) holder).tvTitle.setText(list.get(position).toString());
}
((ViewHolderUser) holder).tvDescription.setText(list.get(position).getRoleAsString() + " (" + RealmTeamLog.getVisitCount(mRealm, list.get(position).getName(), teamId) + " " + context.getString(R.string.visits) + " )");
Picasso.get()
.load(list.get(position).getUserImage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (holder instanceof ViewHolderUser) {
((ViewHolderUser) holder).name.setText(list.get(position).toString());
if (list.get(position).toString().equals(" ")) {
((ViewHolderUser) holder).name.setText(list.get(position).getName());
} else {
((ViewHolderUser) holder).name.setText(list.get(position).toString());
}
((ViewHolderUser) holder).buttonAccept.setOnClickListener(view -> {
acceptReject(list.get(position), true, position);

Expand Down Expand Up @@ -86,4 +90,4 @@ public ViewHolderUser(View itemView) {
buttonReject = itemView.findViewById(R.id.btn_reject);
}
}
}
}

0 comments on commit 17db610

Please sign in to comment.