# Group channel flickering when switching channel (SwiftUI)

**URL:** <https://community.sendbird.com/t/group-channel-flickering-when-switching-channel-swiftui/5917>\
**Category:** iOS\
**Created:** [November 10, 2022, 5:21pm UTC](https://community.sendbird.com/t/group-channel-flickering-when-switching-channel-swiftui/5917 "2022-11-10T17:21:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cleber\_Santos](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/cleber_santos/32/3248_2.png) [@Cleber\_Santos](https://community.sendbird.com/u/Cleber_Santos)\
**Post date:** [November 10, 2022, 5:21pm UTC](https://community.sendbird.com/t/group-channel-flickering-when-switching-channel-swiftui/5917/1 "2022-11-10T17:21:58Z")

</div>

**[Problem/Question]**  
I have a screen that contains some buttons at top and those buttons switch the current channel user needs to see. When tapping button the state will update and change the URL to load this new selected channel.

I’ve tried to eliminate all the state management from the framework I’m using on the client and create a simple view body with just some fixed buttons that trigger a `@State` change with the new URL but still flickers:

[![](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/c/c9abd66ff5f166bf936514542f53e47e6e2976ed.jpeg "SwiftUI Sendbird test with simple view body and `SBUGroupChannelViewController` component") ](https://www.youtube.com/watch?v=l_nhlQtU38k)

Then I’ve tried to go the other way around and keep all the state logic and just replaced the `SBUGroupChannelViewController` with a `Text` that shows the selected channel URL and this makes the flicker go away:

[![](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/f/fbccd9acfbfa9dba48d5303719370f3f0516b362.jpeg "Test without Sendbird `SBUGroupChannelViewController` component") ](https://www.youtube.com/watch?v=3AIu1dcl9Ts)

Can this flicker be related with the way chat is loading the new messages for selected channels?  
Is the group channel trying to present a loading indicator?

* * *

// If problem, please fill out the below. If question, please delete.  
**[UIKit Version]**  
3.2.2

**[Reproduction Steps]**  
Add `SBUGroupChannelViewController` to view body and and switch channel via state (SwiftUI). Example in first video.

**[Frequency]**  
Always

**[Current impact]**  
Screen flickers when switching channels
