Skip to content

Fix: A circle button is visible beneath ChannelAvatarView in ChatChannelView #723

@sheep-q

Description

@sheep-q

What did you do?

  • NavigationBar has its own color, which is different from colors.background (white).
  • Using makeChannelHeaderViewModifier of DefaultViewFactory.
  • Go to a chat screen from the list chat channel.

What did you expect to happen?

The channel avatar view should show correctly like this:
Image

What happened instead?

A circle button, which is filled colors.background, is visible beneath ChannelAvatarView in ChatChannelView:
Image

Fix:

Configure style for button in ToolbarItem, which automates adding padding for Button, it seems like a bug of SwiftUI.
-> Add this line .buttonStyle(.plain) to here like this:
Image

GetStream Environment

GetStream Chat version: 4.66.0
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: iOS 17, iOS 18
Swift version: 5.5
Xcode version: 16.2
Device: both device + simulator

Additional context

Condition to reproduce: NavigationBar has its own color, which is different from colors.background (white).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions