fix color filter

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-08-13 15:48:45 +02:00
parent e43c29fae5
commit 6f8d4bacb2
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
2 changed files with 7 additions and 3 deletions

View file

@ -72,7 +72,7 @@ class OfflineOperationsWorker(
Log_OC.d(TAG, "Create folder operation terminated, result: $result")
}
} catch (e: Exception) {
Log_OC.d(TAG, "Error caught at createFolder: $e")
Log_OC.d(TAG, "Create folder operation terminated, exception is: $e")
}
}
}

View file

@ -680,11 +680,15 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
private void setColorFilterForOfflineOperations(ListGridImageViewHolder holder, OCFile file) {
if (!file.isFolder()) {
return;
}
if (file.isOfflineOperation()) {
holder.getThumbnail().setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_IN);
} else {
int color = ContextCompat.getColor(MainApp.getAppContext(), R.color.color_accent);
holder.getThumbnail().setColorFilter(color, PorterDuff.Mode.SRC_IN);
Drawable drawable = viewThemeUtils.platform.tintDrawable(MainApp.getAppContext(), holder.getThumbnail().getDrawable(), ColorRole.PRIMARY);
holder.getThumbnail().setImageDrawable(drawable);
}
}