mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Change selectedItemBackgroundColorId for dark mode
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
76bfefb491
commit
e176059406
1 changed files with 8 additions and 1 deletions
|
@ -295,8 +295,15 @@ class OCFileListDelegate(
|
|||
private fun setItemLayoutBackgroundColor(file: OCFile, gridViewHolder: ListGridImageViewHolder) {
|
||||
val cornerRadius = context.resources.getDimension(R.dimen.selected_grid_container_radius)
|
||||
|
||||
val itemLayoutBackgroundColorId: Int = if (file.fileId == highlightedItem?.fileId || isCheckedFile(file)) {
|
||||
val isDarkModeActive = (syncFolderProvider?.preferences?.isDarkModeEnabled == true)
|
||||
val selectedItemBackgroundColorId: Int = if (isDarkModeActive) {
|
||||
R.color.action_mode_background
|
||||
} else {
|
||||
R.color.selected_item_background
|
||||
}
|
||||
|
||||
val itemLayoutBackgroundColorId: Int = if (file.fileId == highlightedItem?.fileId || isCheckedFile(file)) {
|
||||
selectedItemBackgroundColorId
|
||||
} else {
|
||||
R.color.bg_default
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue