set background on each emoji / clipboard start instead of onFinishInflate

fixes #171 and apparently #169 too
This commit is contained in:
Helium314 2023-09-21 07:28:21 +02:00
parent 966340156d
commit f27baef12e
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,6 @@ class ClipboardHistoryView @JvmOverloads constructor(
override fun onFinishInflate() { override fun onFinishInflate() {
super.onFinishInflate() super.onFinishInflate()
val colors = Settings.getInstance().current.mColors val colors = Settings.getInstance().current.mColors
colors.setKeyboardBackground(this)
clipboardAdapter = ClipboardAdapter(clipboardLayoutParams, this).apply { clipboardAdapter = ClipboardAdapter(clipboardLayoutParams, this).apply {
itemBackgroundId = keyBackgroundId itemBackgroundId = keyBackgroundId
pinnedIconResId = pinIconId pinnedIconResId = pinIconId
@ -154,6 +153,7 @@ class ClipboardHistoryView @JvmOverloads constructor(
clipboardRecyclerView.apply { clipboardRecyclerView.apply {
adapter = clipboardAdapter adapter = clipboardAdapter
} }
Settings.getInstance().current.mColors.setKeyboardBackground(this)
} }
fun stopClipboardHistory() { fun stopClipboardHistory() {

View file

@ -273,7 +273,6 @@ public final class EmojiPalettesView extends LinearLayout
colors.setBackgroundColor(mAlphabetKeyLeft.getBackground(), BackgroundType.FUNCTIONAL); colors.setBackgroundColor(mAlphabetKeyLeft.getBackground(), BackgroundType.FUNCTIONAL);
colors.setBackgroundColor(mDeleteKey.getBackground(), BackgroundType.FUNCTIONAL); colors.setBackgroundColor(mDeleteKey.getBackground(), BackgroundType.FUNCTIONAL);
colors.setBackgroundColor(mSpacebar.getBackground(), BackgroundType.SPACE); colors.setBackgroundColor(mSpacebar.getBackground(), BackgroundType.SPACE);
colors.setKeyboardBackground(this);
mEmojiCategoryPageIndicatorView.setColors(colors.getAccent(), colors.getAdjustedBackground()); mEmojiCategoryPageIndicatorView.setColors(colors.getAccent(), colors.getAdjustedBackground());
} }
@ -408,6 +407,7 @@ public final class EmojiPalettesView extends LinearLayout
setCurrentCategoryAndPageId(mEmojiCategory.getCurrentCategoryId(), mEmojiCategory.getCurrentCategoryPageId(), setCurrentCategoryAndPageId(mEmojiCategory.getCurrentCategoryId(), mEmojiCategory.getCurrentCategoryPageId(),
true /* force */); true /* force */);
} }
Settings.getInstance().getCurrent().mColors.setKeyboardBackground(this);
} }
public void stopEmojiPalettes() { public void stopEmojiPalettes() {