mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
applyVisualsForOfflineOperations for grid mode
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
efbd8202a3
commit
4ab29f0cd3
1 changed files with 5 additions and 1 deletions
|
@ -541,8 +541,9 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
if (holder.getMore() != null) {
|
||||
ViewExtensionsKt.setVisibleIf(holder.getMore(), !file.isOfflineOperation());
|
||||
}
|
||||
|
||||
ViewExtensionsKt.setVisibleIf(holder.getShared(), !file.isOfflineOperation());
|
||||
|
||||
setColorFilterForOfflineOperations(holder, file);
|
||||
}
|
||||
|
||||
private void bindListItemViewHolder(ListItemViewHolder holder, OCFile file) {
|
||||
|
@ -674,7 +675,10 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
private void applyVisualsForOfflineOperations(ListItemViewHolder holder, OCFile file) {
|
||||
ViewExtensionsKt.setVisibleIf(holder.getOverflowMenu(), !file.isOfflineOperation());
|
||||
ViewExtensionsKt.setVisibleIf(holder.getShared(), !file.isOfflineOperation());
|
||||
setColorFilterForOfflineOperations(holder, file);
|
||||
}
|
||||
|
||||
private void setColorFilterForOfflineOperations(ListGridImageViewHolder holder, OCFile file) {
|
||||
if (file.isOfflineOperation()) {
|
||||
holder.getThumbnail().setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_IN);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue