File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ enum CombinedItem: Identifiable {
5
5
case space( SpaceItem )
6
6
case chat( HomeChatItem )
7
7
8
+ var stableId : String {
9
+ switch self {
10
+ case let . chat( chatItem) :
11
+ " chat_ \( chatItem. dialog. id) "
12
+ case let . space( spaceItem) :
13
+ " space_ \( spaceItem. space. id) "
14
+ }
15
+ }
16
+
8
17
var id : Int64 {
9
18
switch self {
10
19
case let . space( space) : space. id
Original file line number Diff line number Diff line change @@ -107,8 +107,11 @@ struct HomeView: View {
107
107
. padding ( . horizontal, 45 )
108
108
} else {
109
109
List {
110
- ForEach ( combinedItems, id: \. id ) { item in
110
+ ForEach ( combinedItems, id: \. stableId ) { item in
111
111
chatOrSpaceView ( for: item)
112
+ . transaction { transaction in
113
+ transaction. animation = nil
114
+ }
112
115
. listRowInsets ( . init(
113
116
top: 9 ,
114
117
leading: 16 ,
You can’t perform that action at this time.
0 commit comments