applyVisualsForOfflineOperations for grid mode

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-08-13 12:30:14 +02:00
parent efbd8202a3
commit 4ab29f0cd3
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF

View file

@ -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 {