fix: respect day-night board detail filter/search icons
This commit is contained in:
@@ -128,6 +128,7 @@ Kanbn4Droid is an unofficial app to connect to and manipulate data stored in sel
|
|||||||
- Card move requests try these variants for Kan.bn API compatibility: `PUT /api/v1/cards/{cardPublicId}` with `listPublicId`, then GET+full-body `PUT /api/v1/cards/{cardPublicId}` payload (`title`, `description`, `index`, `listPublicId`, `dueDate`), then `PUT /api/v1/cards/{cardPublicId}` with `listId`, then `PATCH /api/v1/cards/{cardPublicId}` with `listId`.
|
- Card move requests try these variants for Kan.bn API compatibility: `PUT /api/v1/cards/{cardPublicId}` with `listPublicId`, then GET+full-body `PUT /api/v1/cards/{cardPublicId}` payload (`title`, `description`, `index`, `listPublicId`, `dueDate`), then `PUT /api/v1/cards/{cardPublicId}` with `listId`, then `PATCH /api/v1/cards/{cardPublicId}` with `listId`.
|
||||||
- Board detail parsing prefers public ids (`publicId`/`public_id`) over internal `id` values so follow-up card/list mutations target correct API identifiers.
|
- Board detail parsing prefers public ids (`publicId`/`public_id`) over internal `id` values so follow-up card/list mutations target correct API identifiers.
|
||||||
- Label chip border colors are hydrated from Kan.bn `Get a label by public ID` (`colourCode`) and cached in-memory by `BoardDetailRepository` so each label color is fetched only once per app process.
|
- Label chip border colors are hydrated from Kan.bn `Get a label by public ID` (`colourCode`) and cached in-memory by `BoardDetailRepository` so each label color is fetched only once per app process.
|
||||||
|
- Filter/search toolbar icons use local vector drawables (`ic_filter_list_24`, `ic_search_24`) with day/night variants so dark mode uses light icon fills automatically.
|
||||||
- Selection action icons use local vector drawables (`ic_select_all_grid_24`, `ic_move_cards_horizontal_24`, `ic_delete_24`) with day/night variants so dark mode uses light icon fills automatically.
|
- Selection action icons use local vector drawables (`ic_select_all_grid_24`, `ic_move_cards_horizontal_24`, `ic_delete_24`) with day/night variants so dark mode uses light icon fills automatically.
|
||||||
- Startup blocking dialogs are shown for missing board id and missing session.
|
- Startup blocking dialogs are shown for missing board id and missing session.
|
||||||
|
|
||||||
|
|||||||
@@ -517,13 +517,15 @@ class BoardDetailActivity : AppCompatActivity() {
|
|||||||
R.id.actionSearch -> R.drawable.ic_search_24
|
R.id.actionSearch -> R.drawable.ic_search_24
|
||||||
else -> null
|
else -> null
|
||||||
} ?: return
|
} ?: return
|
||||||
|
if (!isActive) {
|
||||||
|
item?.icon = AppCompatResources.getDrawable(this, drawableRes)
|
||||||
|
item?.iconTintList = null
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val icon = AppCompatResources.getDrawable(this, drawableRes)?.mutate() ?: return
|
val icon = AppCompatResources.getDrawable(this, drawableRes)?.mutate() ?: return
|
||||||
val wrapped = DrawableCompat.wrap(icon)
|
val wrapped = DrawableCompat.wrap(icon)
|
||||||
val tintColor = if (isActive) {
|
val tintColor = MaterialColors.getColor(this, com.google.android.material.R.attr.colorPrimary, ContextCompat.getColor(this, android.R.color.holo_blue_light))
|
||||||
MaterialColors.getColor(this, com.google.android.material.R.attr.colorPrimary, ContextCompat.getColor(this, android.R.color.holo_blue_light))
|
|
||||||
} else {
|
|
||||||
MaterialColors.getColor(this, com.google.android.material.R.attr.colorOnSurfaceVariant, ContextCompat.getColor(this, android.R.color.black))
|
|
||||||
}
|
|
||||||
DrawableCompat.setTint(wrapped, tintColor)
|
DrawableCompat.setTint(wrapped, tintColor)
|
||||||
item?.icon = wrapped
|
item?.icon = wrapped
|
||||||
item?.iconTintList = android.content.res.ColorStateList.valueOf(tintColor)
|
item?.iconTintList = android.content.res.ColorStateList.valueOf(tintColor)
|
||||||
|
|||||||
12
app/src/main/res/drawable-night/ic_filter_list_24.xml
Normal file
12
app/src/main/res/drawable-night/ic_filter_list_24.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M4,7h16v2H4zM7,11h10v2H7zM10,15h4v2h-4z" />
|
||||||
|
|
||||||
|
</vector>
|
||||||
12
app/src/main/res/drawable-night/ic_search_24.xml
Normal file
12
app/src/main/res/drawable-night/ic_search_24.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M15.5,14h-0.79l-0.28,-0.27a6,6 0,1 0,-1.41,1.41l0.27,0.28v0.79L20,21.5L21.5,20zM10,14a4,4 0,1 1,0 -8a4,4 0,0 1,0 8z" />
|
||||||
|
|
||||||
|
</vector>
|
||||||
Reference in New Issue
Block a user