From 8b5fb94ff5eb9736c9139d9121ccfda8f02e0308 Mon Sep 17 00:00:00 2001 From: Liviu Timar <65943217+liviu-timar@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:03:01 +0300 Subject: [PATCH] Replace avatar click handler with long-click --- .../video/android/ui/join/CallJoinScreen.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dogfooding/src/main/kotlin/io/getstream/video/android/ui/join/CallJoinScreen.kt b/dogfooding/src/main/kotlin/io/getstream/video/android/ui/join/CallJoinScreen.kt index 4c9f6b5da8..47a57ba43e 100644 --- a/dogfooding/src/main/kotlin/io/getstream/video/android/ui/join/CallJoinScreen.kt +++ b/dogfooding/src/main/kotlin/io/getstream/video/android/ui/join/CallJoinScreen.kt @@ -21,10 +21,12 @@ package io.getstream.video.android.ui.join import android.net.Uri import android.widget.Toast import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.border -import androidx.compose.foundation.clickable +import androidx.compose.foundation.combinedClickable +import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -147,6 +149,7 @@ fun CallJoinScreen( } } +@OptIn(ExperimentalFoundationApi::class) @Composable private fun CallJoinHeader( callJoinViewModel: CallJoinViewModel = hiltViewModel(), @@ -164,7 +167,12 @@ private fun CallJoinHeader( user?.let { Box( modifier = if (BuildConfig.FLAVOR == "production") { - Modifier.clickable(onClick = onAvatarLongClick) + Modifier.combinedClickable( + interactionSource = remember { MutableInteractionSource() }, + indication = null, + onClick = {}, + onLongClick = onAvatarLongClick, + ) } else { Modifier },