mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
fix color filter
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
e43c29fae5
commit
6f8d4bacb2
2 changed files with 7 additions and 3 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue