Revert UserPicker to pre-card-wraps state per founder's request

Restore UserPicker.kt and UserPicker.android.kt to their state at 43855ae07
(before commit 3a7118235 introduced SectionView wraps). The founder asked in
chat to keep UserPicker out of the cards facelift — undo all of our changes
to it, including the followup tweaks (avatar padding, divider above grid,
active-profile wrap, etc.) and the founder's own followup cleanup 23b0e41d8
which only existed to refactor our wraps.
This commit is contained in:
another-simple-pixel
2026-05-18 02:48:38 -07:00
parent b3184a1285
commit f99cf9b881
2 changed files with 38 additions and 44 deletions
@@ -1,6 +1,5 @@
package chat.simplex.common.views.chatlist
import CARD_PADDING
import SectionItemView
import androidx.compose.foundation.*
import androidx.compose.foundation.gestures.Orientation
@@ -51,7 +50,7 @@ actual fun UserPickerUsersSection(
Row(
modifier = Modifier.horizontalScroll(scrollState),
) {
Spacer(Modifier.width(CARD_PADDING))
Spacer(Modifier.width(DEFAULT_PADDING))
Row(horizontalArrangement = Arrangement.spacedBy(USER_PICKER_ROW_PADDING)) {
users.forEach { u ->
UserPickerUserBox(u, stopped, modifier = Modifier.userBoxWidth(u.user, users.size, screenWidthDp)) {
@@ -63,7 +62,7 @@ actual fun UserPickerUsersSection(
}
}
}
Spacer(Modifier.width(CARD_PADDING))
Spacer(Modifier.width(DEFAULT_PADDING))
}
}
}
@@ -220,10 +219,10 @@ private fun Modifier.draggableBottomDrawerModifier(
private fun Modifier.userBoxWidth(user: User, totalUsers: Int, windowWidth: Dp): Modifier {
return if (totalUsers == 1) {
this.width(windowWidth - CARD_PADDING * 2)
this.width(windowWidth - DEFAULT_PADDING * 2)
} else if (user.activeUser) {
this.width(windowWidth - CARD_PADDING - (USER_PICKER_ROW_PADDING * 3) - USER_PICKER_IMAGE_SIZE)
this.width(windowWidth - DEFAULT_PADDING - (USER_PICKER_ROW_PADDING * 3) - USER_PICKER_IMAGE_SIZE)
} else {
this.widthIn(max = (windowWidth - (CARD_PADDING * 2)) * 0.618f)
this.widthIn(max = (windowWidth - (DEFAULT_PADDING * 2)) * 0.618f)
}
}