Skip to content

Tint color doesn't apply to message composer #708

@andrej-jasso

Description

@andrej-jasso

What did you do?

I've overriden the chatClient appearance

 func start() {
        var colors = ColorPalette()
        colors.tintColor = Color.Brand.primaryLight
        var appearance = Appearance(colors: colors)

        streamChat = StreamChat(chatClient: chatClient, appearance: appearance)
        Task {
            try? await connectUser()
        }
    }

What did you expect to happen?

Message composed send and action menu button to be tinted too

What happened instead?

Most of the elements changed tint apart from a few critical ones.
The actions in the message composer didn't get tinted. They remained blue because in the code the Color.blue is hard coded in the MessageComposerView

HStack {
              if let command = command,
                 let displayInfo = command.displayInfo,
                 displayInfo.isInstant == true {
                  HStack(spacing: 0) {
                      Image(uiImage: images.smallBolt)
                      Text(displayInfo.displayName.uppercased())
                  }
                  .padding(.horizontal, 8)
                  .font(fonts.footnoteBold)
                  .frame(height: 24)
                  .background(Color.blue)
                  .foregroundColor(.white)
                  .cornerRadius(16)
              }

GetStream Environment

GetStream Chat version: 4.68.0
GetStream Chat frameworks: StreamChatSwiftUI 4.68.0
iOS version: 18
Swift version: 6.0
Xcode version: 16.1
Device: iPhone SE 2nd gen

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions