From f079df50dd4b68d443042c0a672c43c7c7719d64 Mon Sep 17 00:00:00 2001 From: algosketch Date: Thu, 12 Sep 2024 20:59:50 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8F=99=EC=A0=81=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC,=20=EC=9D=BC=EB=B0=98=20=EB=A7=81=ED=81=AC=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/showdetail/ShowDetailScreen.kt | 45 +++++-------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt index 2bdf769e..fe71c808 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt @@ -51,18 +51,10 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.google.firebase.Firebase -import com.google.firebase.dynamiclinks.androidParameters -import com.google.firebase.dynamiclinks.dynamicLinks -import com.google.firebase.dynamiclinks.iosParameters -import com.google.firebase.dynamiclinks.shortLinkAsync import com.nexters.boolti.domain.model.ShowDetail -import com.nexters.boolti.domain.model.ShowState import com.nexters.boolti.presentation.R import com.nexters.boolti.presentation.component.BtAppBar import com.nexters.boolti.presentation.component.BtAppBarDefaults -import com.nexters.boolti.presentation.component.MainButton -import com.nexters.boolti.presentation.component.MainButtonDefaults import com.nexters.boolti.presentation.component.ShowInquiry import com.nexters.boolti.presentation.component.SmallButton import com.nexters.boolti.presentation.extension.requireActivity @@ -250,34 +242,17 @@ private fun ShowDetailAppBar( iconRes = R.drawable.ic_share, description = stringResource(id = R.string.ticketing_share), onClick = { - Firebase.dynamicLinks.shortLinkAsync { - val uri = Uri.parse("https://preview.boolti.in/show/$showId") - link = uri - domainUriPrefix = "https://boolti.page.link" - - androidParameters { - fallbackUrl = uri - } - iosParameters("com.nexters.boolti") { - setFallbackUrl(uri) - } - }.addOnSuccessListener { - it.shortLink?.let { link -> - println(link) - - val sendIntent = Intent().apply { - action = Intent.ACTION_SEND - putExtra( - Intent.EXTRA_TEXT, - link.toString() - ) - type = "text/plain" - } - - val shareIntent = Intent.createChooser(sendIntent, null) - context.startActivity(shareIntent) - } + val sendIntent = Intent().apply { + action = Intent.ACTION_SEND + putExtra( + Intent.EXTRA_TEXT, + "https://preview.boolti.in/show/$showId" + ) + type = "text/plain" } + val shareIntent = Intent.createChooser(sendIntent, null) + + context.startActivity(shareIntent) }, ) BtAppBarDefaults.AppBarIconButton(