feat: Always use FullSizeAvatar in ProfileScreen to prevent flickering during transitions

This commit is contained in:
k1ngsterr1
2026-01-30 03:45:52 +05:00
parent 5091eb557a
commit c4424683cb

View File

@@ -777,23 +777,12 @@ private fun CollapsingProfileHeader(
) { ) {
// Используем AvatarImage если репозиторий доступен // Используем AvatarImage если репозиторий доступен
if (avatarRepository != null) { if (avatarRepository != null) {
// При collapseProgress < 0.35 - fullscreen аватар (ещё не полностью круглый) // Всегда используем FullSizeAvatar чтобы избежать мерцания при переключении
if (collapseProgress < 0.35f) {
FullSizeAvatar( FullSizeAvatar(
publicKey = publicKey, publicKey = publicKey,
avatarRepository = avatarRepository, avatarRepository = avatarRepository,
isDarkTheme = isDarkTheme isDarkTheme = isDarkTheme
) )
} else {
AvatarImage(
publicKey = publicKey,
avatarRepository = avatarRepository,
size = avatarSize,
isDarkTheme = isDarkTheme,
onClick = null,
showOnlineIndicator = false
)
}
} else { } else {
// Fallback: цветной placeholder с инициалами // Fallback: цветной placeholder с инициалами
Box( Box(