diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/feed/ChatroomListFeedView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/feed/ChatroomListFeedView.kt index 801d80555..300f36eda 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/feed/ChatroomListFeedView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/feed/ChatroomListFeedView.kt @@ -158,7 +158,7 @@ private data class EphemeralChannelLazyKey( ) : ChatroomLazyKey private data class PrivateChatLazyKey( - val key: String, + val users: HashSet, ) : ChatroomLazyKey private data class FallbackChatroomLazyKey( @@ -192,13 +192,10 @@ private fun chatroomLazyKey( } is ChatroomKeyable -> { - PrivateChatLazyKey( - event - .chatroomKey(myPubKey) - .users - .sorted() - .joinToString(","), - ) + // ChatroomKey.users may be a kotlinx PersistentOrderedSet, which + // is not Serializable. Copy into a HashSet so the key survives + // Bundle round-trips; Set equality stays order-independent. + PrivateChatLazyKey(HashSet(event.chatroomKey(myPubKey).users)) } else -> {