Dynamic Colors doesn't update
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 63/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- mobile-dev
Research direction
Start by reading latin/common/Colors.kt and the KeyboardSwitcher.updateKeyboardThemeAndContextThemeWrapper() path called from onStartInputView; compare how the settings screen and keyboard obtain their contexts and check colors. Reproduce the reported palette change, then verify that opening the keyboard picks up the new colors without force-stopping LeanType.
Written by the indexing model from the issue text.
Description
As said by claude
Describe the bug
When the system Material You palette changes while LeanType is running, the keyboard with the Dynamic colors theme keeps showing the old colors. LeanType's settings screen updates to the new palette right away, but the keyboard doesn't update until LeanType is force-stopped.
To Reproduce
- Select the Dynamic colors keyboard theme.
- Change the system Material You palette. In my case, ColorBlendr (Shizuku mode) re-applies colors each time Paperize sets a new static wallpaper. Changing colors manually in ColorBlendr gives the same result.
- Open LeanType settings: the new colors are shown correctly.
- Open the keyboard in any text field: it still shows the previous palette.
- Force-stop LeanType and open the keyboard again: the new colors appear.
Expected behavior
The keyboard picks up the new system palette the next time it's shown, like the settings screen does.
Screenshots
N/A
App version & Flavor
[version, e.g. v4.2.x] / standard
Device Info
- Model: Samsung Galaxy Z Fold 6
- OS version: [Android version] / One UI [version]
Additional context (possible cause)
From reading the source, this might be the cause (unconfirmed):
DynamicColors(latin/common/Colors.kt) readssystem_accent*/system_neutral*once in its constructor.KeyboardSwitcher.updateKeyboardThemeAndContextThemeWrapper()checksmColors.haveColorsChanged(context)ononStartInputView, but the context passed in isdisplayContext, which is created once inonInitializeInterface()and reused.- If that long-lived context keeps returning the old
system_*values after the theme overlay changes,haveColorsChanged()returns false and the theme never reloads. The settings activity gets a fresh context, so it isn't affected.
Workaround: force-stopping LeanType loads the current colors.
- Dominant language
- Kotlin
- Stars
- 1k
- Forks
- 59
- Avg merge
- 13h 21m
- Merged PRs (30d)
- 48
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LeanBitLab/LeanType
-
Voice input fails in browser address bars due to incorrect password field detection (v4.2.9, follow-up to #516)Possibly taken @LeanBitLab claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
LeanBitLab/LeanType#713 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LeanBitLab/LeanType#423 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
LeanBitLab/LeanType#723 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 56/100
LeanBitLab/LeanType#721 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
LeanBitLab/LeanType#720 ·
Maintainers usually reply within 1 day
All issues in LeanBitLab/LeanType
Similar issues
-
Messages: Subscribe to the new communication websocket topicsPossibly taken @krusche claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ls1intum/artemis-android#801 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
keiyoushi/extensions-source#20362 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
software-mansion/enriched-markdown#1084 ·
Maintainers usually reply within 2 days