From 96783ae1aab19b6361fbf66368dcd45443db532f Mon Sep 17 00:00:00 2001 From: CMK Date: Tue, 8 Jun 2021 17:31:27 +0800 Subject: [PATCH] fix: compose scene custom emoji button image not set adaptive appearance issue --- Mastodon/Scene/Compose/View/ComposeToolbarView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mastodon/Scene/Compose/View/ComposeToolbarView.swift b/Mastodon/Scene/Compose/View/ComposeToolbarView.swift index 68f5eed06..9f2b5e74f 100644 --- a/Mastodon/Scene/Compose/View/ComposeToolbarView.swift +++ b/Mastodon/Scene/Compose/View/ComposeToolbarView.swift @@ -218,6 +218,12 @@ extension ComposeToolbarView { } private func updateToolbarButtonUserInterfaceStyle() { + // reset emoji + let emojiButtonImage = Asset.Human.faceSmilingAdaptive.image + .af.imageScaled(to: CGSize(width: 20, height: 20)) + .withRenderingMode(.alwaysTemplate) + emojiButton.setImage(emojiButtonImage, for: .normal) + switch traitCollection.userInterfaceStyle { case .light: mediaButton.setImage(UIImage(systemName: "photo", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular))!, for: .normal)