diff --git a/RiotSwiftUI/Modules/Common/Util/InlineTextButton.swift b/RiotSwiftUI/Modules/Common/Util/InlineTextButton.swift index e5673b12c..42ce478d7 100644 --- a/RiotSwiftUI/Modules/Common/Util/InlineTextButton.swift +++ b/RiotSwiftUI/Modules/Common/Util/InlineTextButton.swift @@ -69,8 +69,13 @@ struct InlineTextButton: View { func makeBody(configuration: Configuration) -> some View { components.reduce(Text("")) { lastValue, component in - lastValue + Text(component.string) - .foregroundColor(component.isTinted ? .accentColor.opacity(configuration.isPressed ? 0.2 : 1) : nil) + var text: Text = .init(component.string) + + if component.isTinted { + text = text.foregroundColor(.accentColor.opacity(configuration.isPressed ? 0.2 : 1)) + } + + return lastValue + text } } }