File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -147,19 +147,13 @@ extension AppState {
147147 guard let currentUserId = chatClient. currentUserId else { fatalError ( " Not logged in " ) }
148148 switch identifier {
149149 case . initial:
150+ var sort : [ Sorting < ChannelListSortingKey > ] = [ Sorting ( key: . default) ]
151+ if AppConfiguration . default. isChannelPinningFeatureEnabled {
152+ sort. insert ( Sorting ( key: . pinnedAt) , at: 0 )
153+ }
150154 return ChannelListQuery (
151155 filter: . containMembers( userIds: [ currentUserId] ) ,
152- sort: [
153- Sorting ( key: . default)
154- ]
155- )
156- case . initial where AppConfiguration . default. isChannelPinningFeatureEnabled:
157- return ChannelListQuery (
158- filter: . containMembers( userIds: [ currentUserId] ) ,
159- sort: [
160- Sorting ( key: . pinnedAt) ,
161- Sorting ( key: . default)
162- ]
156+ sort: sort
163157 )
164158 case . archived:
165159 return ChannelListQuery (
You can’t perform that action at this time.
0 commit comments