mirror of
https://github.com/nextcloud/android.git
synced 2024-11-21 20:55:31 +03:00
Merge pull request #3796 from nextcloud/npeInOwnerId
Do not show avatar if ownerId is null
This commit is contained in:
commit
49df3c14dc
1 changed files with 10 additions and 7 deletions
|
@ -38,12 +38,7 @@ import android.widget.Filter;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.graphics.drawable.RoundedBitmapDrawable;
|
||||
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.BitmapImageViewTarget;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
|
@ -84,6 +79,13 @@ import java.util.Locale;
|
|||
import java.util.Set;
|
||||
import java.util.Vector;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.graphics.drawable.RoundedBitmapDrawable;
|
||||
import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* This Adapter populates a RecyclerView with all files and folders in a Nextcloud instance.
|
||||
*/
|
||||
|
@ -316,7 +318,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
if (holder instanceof OCFileListItemViewHolder) {
|
||||
OCFileListItemViewHolder itemViewHolder = (OCFileListItemViewHolder) holder;
|
||||
|
||||
if (file.isSharedWithMe() && !multiSelect && !gridView && !mHideItemOptions) {
|
||||
if (file.isSharedWithMe() && file.getOwnerId() != null && !multiSelect && !gridView &&
|
||||
!mHideItemOptions) {
|
||||
itemViewHolder.sharedAvatar.setVisibility(View.VISIBLE);
|
||||
|
||||
Resources resources = mContext.getResources();
|
||||
|
|
Loading…
Reference in a new issue