From abcf18869b09d0f6e864d3d37da7acae85d59135 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 13:49:31 +0900 Subject: [PATCH 01/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=EC=9D=91?= =?UTF-8?q?=EB=8B=B5=20=EC=99=84=EB=A3=8C=20=ED=99=94=EB=A9=B4=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/main/respond/result/RespondPlanCompleteScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanCompleteScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanCompleteScreen.kt index 22fb4c4d..1766c7a8 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanCompleteScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanCompleteScreen.kt @@ -26,7 +26,7 @@ fun RespondPlanCompleteScreen( modifier = Modifier .fillMaxSize() .background(Color.White) - .padding(top = 70.dp) + .padding(top = 25.dp) ) { Column( modifier = Modifier.weight(1f) From 83958fad2af98a08bfe611f4b08fdfdba988d179 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 13:49:55 +0900 Subject: [PATCH 02/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=EC=9D=91?= =?UTF-8?q?=EB=8B=B5=20=EA=B1=B0=EC=A0=88=20=ED=99=94=EB=A9=B4=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/main/respond/result/RespondPlanRejectScreen.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanRejectScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanRejectScreen.kt index 9ce7e84c..24c06664 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanRejectScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/respond/result/RespondPlanRejectScreen.kt @@ -28,14 +28,16 @@ fun RespondPlanRejectScreen( modifier = Modifier .fillMaxSize() .background(Color.White) - .padding(top = 70.dp) + .padding(top = 25.dp) ) { Column( modifier = Modifier .padding(start = 20.dp) ) { Text( - text = userName, style = PlanzTypography.h2, color = Gray900 + text = userName + "님", + style = PlanzTypography.h2, + color = Gray900 ) Text( From ad197582329cdb4c46d2673086ea03de730f85a6 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 13:50:50 +0900 Subject: [PATCH 03/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=ED=99=95?= =?UTF-8?q?=EC=A0=95=20=ED=99=94=EB=A9=B4=20=EC=95=B1=EB=B0=94=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../growth/presentation/component/PlanzTwoIconAppBar.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTwoIconAppBar.kt b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTwoIconAppBar.kt index 04f08c6d..5bcfa3fe 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTwoIconAppBar.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTwoIconAppBar.kt @@ -1,10 +1,7 @@ package com.yapp.growth.presentation.component import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Icon import androidx.compose.material.Text @@ -52,8 +49,8 @@ private fun PlanzTwoIconAppBar( Box( modifier = modifier .fillMaxWidth() - .height(76.dp) - .padding(top = 20.dp) + .wrapContentHeight() + .padding(top = 20.dp, bottom = 15.dp) ) { Icon( From ced6509bcbcf5bb7c5430eba6989059cd3f46577 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 13:56:44 +0900 Subject: [PATCH 04/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=ED=91=9C=20=EC=95=88=EC=97=90=20=EC=9E=A5=EC=86=8C=20?= =?UTF-8?q?=EB=B0=8F=20=EC=BB=AC=EB=9F=AC=EB=B0=95=EC=8A=A4=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yapp/growth/presentation/component/PlanzTimeTable.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTimeTable.kt b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTimeTable.kt index a7a1349a..a2941339 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTimeTable.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTimeTable.kt @@ -355,7 +355,7 @@ fun LocationAndAvailableColorBox( modifier = modifier .fillMaxWidth() .wrapContentHeight() - .padding(top = 8.dp, bottom = 16.dp, start = 14.dp, end = 20.dp) + .padding(bottom = 16.dp, start = 20.dp, end = 16.dp) ) { Row( From 9ff75e0023ee90a62d1b73015751e75033509f3f Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 13:58:28 +0900 Subject: [PATCH 05/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=ED=99=95?= =?UTF-8?q?=EC=A0=95=20=ED=99=94=EB=A9=B4=20=EC=95=B1=EB=B0=94=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/component/PlanzIconAndTextAppBar.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzIconAndTextAppBar.kt b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzIconAndTextAppBar.kt index a04dde10..2fb8054c 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzIconAndTextAppBar.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzIconAndTextAppBar.kt @@ -1,10 +1,7 @@ package com.yapp.growth.presentation.component import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Icon import androidx.compose.material.Text @@ -55,8 +52,8 @@ private fun PlanzIconAndTextAppBar( Box( modifier = modifier .fillMaxWidth() - .height(76.dp) - .padding(top = 20.dp) + .wrapContentHeight() + .padding(top = 20.dp, bottom = 15.dp) ) { Icon( From 8b311f7c0791323eb45831ce8017d8057cc0b19f Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 14:02:33 +0900 Subject: [PATCH 06/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=ED=98=84?= =?UTF-8?q?=ED=99=A9=20-=20navigation=20argument=20key=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/main/monitor/MonitorPlanViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/monitor/MonitorPlanViewModel.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/monitor/MonitorPlanViewModel.kt index bed93df2..eb174b8b 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/monitor/MonitorPlanViewModel.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/monitor/MonitorPlanViewModel.kt @@ -8,6 +8,7 @@ import com.yapp.growth.domain.entity.TimeCheckedOfDay import com.yapp.growth.domain.entity.TimeTable import com.yapp.growth.domain.entity.User import com.yapp.growth.domain.usecase.GetRespondUsersUseCase +import com.yapp.growth.presentation.ui.main.KEY_PLAN_ID import dagger.hilt.android.lifecycle.HiltViewModel import com.yapp.growth.presentation.ui.main.monitor.MonitorPlanContract.* import kotlinx.coroutines.Dispatchers @@ -24,7 +25,7 @@ class MonitorPlanViewModel @Inject constructor( private var originalTable: TimeTable = TimeTable(emptyList(), emptyList(), 0, emptyList(), 0, "", User(0, ""), "", "", emptyList(), emptyList(), "", "") private var currentIndex = 0 - private val planId: Long = savedStateHandle.get("planId") ?: 0L + private val planId: Long = savedStateHandle.get(KEY_PLAN_ID) ?: -1L init { loadRespondUsers(planId) From b56095a422bdd2a1cc619bdf68c1e8669accd334 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 14:05:07 +0900 Subject: [PATCH 07/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=ED=98=84?= =?UTF-8?q?=ED=99=A9=20=EC=95=B1=EB=B0=94=20=ED=8C=A8=EB=94=A9=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yapp/growth/presentation/component/PlanzAppBar.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzAppBar.kt b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzAppBar.kt index bfb16051..312d1751 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzAppBar.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/component/PlanzAppBar.kt @@ -146,7 +146,8 @@ private fun PlanzColorTextAppBar( Box( modifier = modifier .fillMaxWidth() - .height(80.dp) + .wrapContentHeight() + .padding(vertical = 24.dp) ) { Text( @@ -228,4 +229,4 @@ fun PreviewPlanzColorTextWithExitAppBar() { title = "식사", onExitClick = { } ) -} \ No newline at end of file +} From 2a0f56bb495a2339fa2b5fc0d15ff76274595560 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 14:05:34 +0900 Subject: [PATCH 08/10] =?UTF-8?q?fix=20:=20=EC=95=BD=EC=86=8D=20=EA=B1=B0?= =?UTF-8?q?=EC=A0=88=ED=99=94=EB=A9=B4=EC=9C=BC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=EB=B0=B1=EC=8A=A4=ED=83=9D=20=EA=B4=80=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/main/PlanzScreen.kt | 128 +++++++++--------- 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/PlanzScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/PlanzScreen.kt index 494ed8ea..df87da74 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/PlanzScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/PlanzScreen.kt @@ -190,7 +190,11 @@ fun PlanzScreen( } }, navigateToSendRejectedScreen = { - navController.navigate(PlanzScreenRoute.RESPOND_PLAN_REJECT.route.plus("/{$KEY_PLAN_ID}")) + navController.navigate(PlanzScreenRoute.RESPOND_PLAN_REJECT.route) { + popUpTo(PlanzScreenRoute.RESPOND_PLAN.route.plus("/{$KEY_PLAN_ID}")) { + inclusive = true + } + } } ) } @@ -204,79 +208,79 @@ fun PlanzScreen( ) } - composable(route = PlanzScreenRoute.RESPOND_PLAN_COMPLETE.route) { - RespondPlanCompleteScreen( - navigateToPreviousScreen = { navController.popBackStack() }, - ) - } + composable(route = PlanzScreenRoute.RESPOND_PLAN_COMPLETE.route) { + RespondPlanCompleteScreen( + navigateToPreviousScreen = { navController.popBackStack() }, + ) + } - composable(route = PlanzScreenRoute.RESPOND_PLAN_REJECT.route) { - RespondPlanRejectScreen( - userName = viewModel.getUserName(), - navigateToPreviousScreen = { navController.popBackStack() }, - ) - } + composable(route = PlanzScreenRoute.RESPOND_PLAN_REJECT.route) { + RespondPlanRejectScreen( + userName = viewModel.getUserName(), + navigateToPreviousScreen = { navController.popBackStack() }, + ) + } - composable(route = PlanzScreenRoute.ALREADY_CONFIRM_PLAN.route) { - AlreadyConfirmPlanScreen( - navigateToPreviousScreen = { navController.popBackStack() }, - ) - } + composable(route = PlanzScreenRoute.ALREADY_CONFIRM_PLAN.route) { + AlreadyConfirmPlanScreen( + navigateToPreviousScreen = { navController.popBackStack() }, + ) + } - composable(route = PlanzScreenRoute.FULLED_PLAN.route) { - FulledPlanScreen( - navigateToPreviousScreen = { navController.popBackStack() }, - ) - } + composable(route = PlanzScreenRoute.FULLED_PLAN.route) { + FulledPlanScreen( + navigateToPreviousScreen = { navController.popBackStack() }, + ) + } - composable(route = PlanzScreenRoute.CONFIRM_PLAN.route.plus("/{$KEY_PLAN_ID}"), - arguments = listOf( - navArgument(KEY_PLAN_ID) { type = NavType.LongType } - )) { - FixPlanScreen( - navigateToPreviousScreen = { navController.popBackStack() }, - navigateToNextScreen = { planId -> - navController.navigate(PlanzScreenRoute.DETAIL_PLAN.route.plus("/${planId}")) { - popUpTo(PlanzScreenRoute.CONFIRM_PLAN.route.plus("/{$KEY_PLAN_ID}")) { - inclusive = true + composable(route = PlanzScreenRoute.CONFIRM_PLAN.route.plus("/{$KEY_PLAN_ID}"), + arguments = listOf( + navArgument(KEY_PLAN_ID) { type = NavType.LongType } + )) { + FixPlanScreen( + navigateToPreviousScreen = { navController.popBackStack() }, + navigateToNextScreen = { planId -> + navController.navigate(PlanzScreenRoute.DETAIL_PLAN.route.plus("/${planId}")) { + popUpTo(PlanzScreenRoute.CONFIRM_PLAN.route.plus("/{$KEY_PLAN_ID}")) { + inclusive = true + } } - } - }, - ) - } + }, + ) + } - composable(route = PlanzScreenRoute.MY_PAGE.route) { - MyPageScreen( - exitMyPageScreen = { navController.popBackStack() }, - navigateToPolicyScreen = { navController.navigate(PlanzScreenRoute.PRIVACY_POLICY.route) }, - navigateToTermsScreen = { navController.navigate(PlanzScreenRoute.TERMS.route) }, - ) - } + composable(route = PlanzScreenRoute.MY_PAGE.route) { + MyPageScreen( + exitMyPageScreen = { navController.popBackStack() }, + navigateToPolicyScreen = { navController.navigate(PlanzScreenRoute.PRIVACY_POLICY.route) }, + navigateToTermsScreen = { navController.navigate(PlanzScreenRoute.TERMS.route) }, + ) + } - composable(route = PlanzScreenRoute.PRIVACY_POLICY.route) { - PrivacyPolicyScreen( - exitPrivacyPolicyScreen = { navController.popBackStack() } - ) - } + composable(route = PlanzScreenRoute.PRIVACY_POLICY.route) { + PrivacyPolicyScreen( + exitPrivacyPolicyScreen = { navController.popBackStack() } + ) + } - composable(route = PlanzScreenRoute.TERMS.route) { - TermsScreen( - exitTermsScreen = { navController.popBackStack() } - ) - } + composable(route = PlanzScreenRoute.TERMS.route) { + TermsScreen( + exitTermsScreen = { navController.popBackStack() } + ) + } - composable( - route = PlanzScreenRoute.DETAIL_PLAN.route - .plus("/{$KEY_PLAN_ID}"), - arguments = listOf( - navArgument(KEY_PLAN_ID) { type = NavType.LongType } - ) - ) { - DetailPlanScreen(exitDetailPlanScreen = { navController.popBackStack() }) + composable( + route = PlanzScreenRoute.DETAIL_PLAN.route + .plus("/{$KEY_PLAN_ID}"), + arguments = listOf( + navArgument(KEY_PLAN_ID) { type = NavType.LongType } + ) + ) { + DetailPlanScreen(exitDetailPlanScreen = { navController.popBackStack() }) + } } } } -} bottomBarState = when (currentDestination?.route) { From 8a5bf71f865da63c5743d5ba9586662b540be8c4 Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 14:05:54 +0900 Subject: [PATCH 09/10] =?UTF-8?q?release=20:=20=EB=B2=84=EC=A0=84=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildSrc/src/main/java/Configs.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/Configs.kt b/buildSrc/src/main/java/Configs.kt index 6487eda4..3684bd0d 100644 --- a/buildSrc/src/main/java/Configs.kt +++ b/buildSrc/src/main/java/Configs.kt @@ -6,6 +6,6 @@ object Configs { const val APPLICATION_ID = "com.yapp.growth" const val MIN_SDK = 26 const val TARGET_SDK = 32 - const val VERSION_CODE = 220725001 - const val VERSION_NAME = "1.0.1" + const val VERSION_CODE = 220731001 + const val VERSION_NAME = "1.0.3" } From c141956b7c94082d1f33f3796cbdfe172a3108cf Mon Sep 17 00:00:00 2001 From: KwonDae Date: Sun, 31 Jul 2022 20:40:00 +0900 Subject: [PATCH 10/10] =?UTF-8?q?feat=20:=20=EB=8B=A4=EC=9D=B4=EB=82=98?= =?UTF-8?q?=EB=AF=B9=20=EB=A7=81=ED=81=AC=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/firebase/DynamicLink.kt | 22 +++++++----- .../ui/createPlan/CreatePlanScreen.kt | 34 ++++++++++++++++++- .../ui/createPlan/share/ShareScreen.kt | 9 +++-- .../ui/createPlan/share/ShareViewModel.kt | 15 +++++++- .../ui/main/confirm/FixPlanScreen.kt | 10 +++++- presentation/src/main/res/values/strings.xml | 6 ++-- 6 files changed, 81 insertions(+), 15 deletions(-) diff --git a/presentation/src/main/java/com/yapp/growth/presentation/firebase/DynamicLink.kt b/presentation/src/main/java/com/yapp/growth/presentation/firebase/DynamicLink.kt index ed48dfa4..0a1c09f6 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/firebase/DynamicLink.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/firebase/DynamicLink.kt @@ -4,14 +4,9 @@ package com.yapp.growth.presentation.firebase import android.content.Context import android.content.Intent import android.net.Uri -import com.google.firebase.dynamiclinks.ktx.androidParameters -import com.google.firebase.dynamiclinks.ktx.component1 -import com.google.firebase.dynamiclinks.ktx.component2 -import com.google.firebase.dynamiclinks.ktx.dynamicLinks -import com.google.firebase.dynamiclinks.ktx.shortLinkAsync +import com.google.firebase.dynamiclinks.ktx.* import com.google.firebase.ktx.Firebase import com.yapp.growth.presentation.BuildConfig -import timber.log.Timber const val DYNAMIC_LINK_PARAM = "dynamic_link_param" const val PLAN_ID_KEY_NAME = "planId" @@ -27,12 +22,23 @@ fun getDeepLink(scheme: String, key: String?, id: String?): Uri { fun onDynamicLinkClick( context: Context, scheme: SchemeType, - id: String? = null + id: String? = null, + thumbNailTitle: String, + thumbNailDescription: String, + thumbNailImageUrl: String, ) { Firebase.dynamicLinks.shortLinkAsync { link = getDeepLink(scheme.name, scheme.key, id) domainUriPrefix = BuildConfig.PLANZ_FIREBASE_PREFIX androidParameters(context.packageName) { } + iosParameters(context.packageName) { + setFallbackUrl(Uri.parse("https://jalynne.notion.site/3379be16ecc04914bb98f8a57c980a46")) + } + socialMetaTagParameters { + title = thumbNailTitle + description = thumbNailDescription + imageUrl = Uri.parse(thumbNailImageUrl) + } }.addOnSuccessListener { (shortLink, _) -> runCatching { @@ -43,7 +49,7 @@ fun onDynamicLinkClick( context.startActivity(Intent.createChooser(sendIntent, "Share")) } .onFailure { - Timber.tag("SHORTLINK").e(it) + } } diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/CreatePlanScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/CreatePlanScreen.kt index bd8e6670..3714eada 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/CreatePlanScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/CreatePlanScreen.kt @@ -2,15 +2,20 @@ package com.yapp.growth.presentation.ui.createPlan import android.content.Intent import androidx.compose.foundation.layout.padding +import androidx.compose.material.MaterialTheme import androidx.compose.material.Scaffold -import androidx.compose.runtime.Composable +import androidx.compose.runtime.* import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.navigation.NavHostController import androidx.navigation.NavType import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable +import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navArgument +import com.google.accompanist.systemuicontroller.rememberSystemUiController +import com.yapp.growth.presentation.theme.BackgroundColor1 import com.yapp.growth.presentation.ui.createPlan.date.DateScreen import com.yapp.growth.presentation.ui.createPlan.share.ShareScreen import com.yapp.growth.presentation.ui.createPlan.theme.ThemeScreen @@ -24,6 +29,22 @@ fun CreatePlanScreen( exitCreatePlan: () -> Unit, startShareActivity: (Intent) -> Unit, ) { + val navBackStackEntry by navController.currentBackStackEntryAsState() + val currentDestination = navBackStackEntry?.destination + + val systemUiController = rememberSystemUiController() + val useDarkIcons = MaterialTheme.colors.isLight + var statusBarColor: Color by remember { mutableStateOf(Color.White) } + + statusBarColor = when (currentDestination?.route) { + CreatePlanScreenRoute.SHARE.route -> { + BackgroundColor1 + } + else -> { + Color.White + } + } + Scaffold { innerPadding -> NavHost( modifier = Modifier.padding(innerPadding), @@ -92,6 +113,17 @@ fun CreatePlanScreen( } } } + + SideEffect { + systemUiController.setSystemBarsColor( + color = statusBarColor, + darkIcons = useDarkIcons + ) + + systemUiController.setNavigationBarColor( + color = BackgroundColor1 + ) + } } enum class CreatePlanScreenRoute(val route: String) { diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareScreen.kt index 9d2949f3..285f8e92 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareScreen.kt @@ -110,9 +110,14 @@ fun ShareScreen( } } } - + LaunchedEffect(Unit) { - viewModel.getDynamicLink(context) + viewModel.getDynamicLink( + context = context, + thumbNailTitle = context.getString(R.string.share_thumbnail_title), + thumbNailDescription = context.getString(R.string.share_thumbnail_description), + thumbNailImageUrl = BuildConfig.BASE_URL + context.getString(R.string.share_plan_share_feed_template_image_url) + ) } LaunchedEffect(key1 = viewModel.effect) { diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareViewModel.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareViewModel.kt index edda236c..4bc2610e 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareViewModel.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareViewModel.kt @@ -1,11 +1,13 @@ package com.yapp.growth.presentation.ui.createPlan.share import android.content.Context +import android.net.Uri import androidx.lifecycle.SavedStateHandle import com.google.firebase.dynamiclinks.ktx.* import com.google.firebase.ktx.Firebase import com.yapp.growth.base.BaseViewModel import com.yapp.growth.presentation.BuildConfig +import com.yapp.growth.presentation.R import com.yapp.growth.presentation.firebase.SchemeType import com.yapp.growth.presentation.firebase.getDeepLink import com.yapp.growth.presentation.ui.createPlan.share.ShareContract.* @@ -45,12 +47,23 @@ class ShareViewModel @Inject constructor( fun getDynamicLink( context: Context, scheme: SchemeType = SchemeType.RESPOND, - id: String = planId.toString() + id: String = planId.toString(), + thumbNailTitle: String, + thumbNailDescription: String, + thumbNailImageUrl: String, ) { Firebase.dynamicLinks.shortLinkAsync { link = getDeepLink(scheme.name, scheme.key, id) domainUriPrefix = BuildConfig.PLANZ_FIREBASE_PREFIX androidParameters(context.packageName) { } + iosParameters(context.packageName) { + setFallbackUrl(Uri.parse("https://jalynne.notion.site/3379be16ecc04914bb98f8a57c980a46")) + } + socialMetaTagParameters { + title = thumbNailTitle + description = thumbNailDescription + imageUrl = Uri.parse(thumbNailImageUrl) + } }.addOnSuccessListener { (shortLink, _) -> updateState { copy(shareUrl = shortLink.toString()) } diff --git a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/confirm/FixPlanScreen.kt b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/confirm/FixPlanScreen.kt index 9f0564b8..76589048 100644 --- a/presentation/src/main/java/com/yapp/growth/presentation/ui/main/confirm/FixPlanScreen.kt +++ b/presentation/src/main/java/com/yapp/growth/presentation/ui/main/confirm/FixPlanScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.res.stringResource import androidx.constraintlayout.compose.ConstraintLayout import androidx.constraintlayout.compose.Dimension import androidx.hilt.navigation.compose.hiltViewModel +import com.yapp.growth.presentation.BuildConfig import com.yapp.growth.presentation.R import com.yapp.growth.presentation.component.* import com.yapp.growth.presentation.firebase.SchemeType @@ -50,7 +51,14 @@ fun FixPlanScreen( PlanzBackAndShareAppBar( title = stringResource(id = R.string.fix_plan_title_text), onClickBackIcon = { viewModel.setEvent(FixPlanEvent.OnClickBackButton) }, - onClickShareIcon = { onDynamicLinkClick(context, SchemeType.RESPOND, uiState.planId.toString()) } + onClickShareIcon = { onDynamicLinkClick( + context, SchemeType.RESPOND, + uiState.planId.toString(), + thumbNailTitle = context.getString(R.string.share_thumbnail_title), + thumbNailDescription = context.getString(R.string.share_thumbnail_description), + thumbNailImageUrl = BuildConfig.BASE_URL + context.getString(R.string.share_plan_share_feed_template_image_url) + ) + } ) } ) { padding -> diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 94f473ed..a0fbda92 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -123,8 +123,6 @@ 약속 요청이 도착했어요! 가능한 약속 날짜와 시간을 응답해 주세요! /images/share-feed.png - /images/share-feed.png - /images/share-feed.png 약속응답 @@ -156,6 +154,10 @@ 이미 확정된 약속입니다. + + "약속 조율 요청이 도착했어요!" + "정말 편리한 약속잡기, Planz" + Exit Icon Create Icon Check Icon