Skip to content

Commit 10e4cc6

Browse files
authored
Merge pull request #157 from YAPP-Github/release/r1.0.3
release 1.0.3 버전배포 및 오류수정
2 parents 08f5370 + c141956 commit 10e4cc6

File tree

15 files changed

+166
-98
lines changed

15 files changed

+166
-98
lines changed

buildSrc/src/main/java/Configs.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ object Configs {
66
const val APPLICATION_ID = "com.yapp.growth"
77
const val MIN_SDK = 26
88
const val TARGET_SDK = 32
9-
const val VERSION_CODE = 220725001
10-
const val VERSION_NAME = "1.0.1"
9+
const val VERSION_CODE = 220731001
10+
const val VERSION_NAME = "1.0.3"
1111
}

presentation/src/main/java/com/yapp/growth/presentation/component/PlanzAppBar.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ private fun PlanzColorTextAppBar(
146146
Box(
147147
modifier = modifier
148148
.fillMaxWidth()
149-
.height(80.dp)
149+
.wrapContentHeight()
150+
.padding(vertical = 24.dp)
150151
) {
151152

152153
Text(
@@ -228,4 +229,4 @@ fun PreviewPlanzColorTextWithExitAppBar() {
228229
title = "식사",
229230
onExitClick = { }
230231
)
231-
}
232+
}

presentation/src/main/java/com/yapp/growth/presentation/component/PlanzIconAndTextAppBar.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.yapp.growth.presentation.component
22

33
import androidx.compose.foundation.clickable
4-
import androidx.compose.foundation.layout.Box
5-
import androidx.compose.foundation.layout.fillMaxWidth
6-
import androidx.compose.foundation.layout.height
7-
import androidx.compose.foundation.layout.padding
4+
import androidx.compose.foundation.layout.*
85
import androidx.compose.foundation.shape.RoundedCornerShape
96
import androidx.compose.material.Icon
107
import androidx.compose.material.Text
@@ -55,8 +52,8 @@ private fun PlanzIconAndTextAppBar(
5552
Box(
5653
modifier = modifier
5754
.fillMaxWidth()
58-
.height(76.dp)
59-
.padding(top = 20.dp)
55+
.wrapContentHeight()
56+
.padding(top = 20.dp, bottom = 15.dp)
6057
) {
6158

6259
Icon(

presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTimeTable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ fun LocationAndAvailableColorBox(
355355
modifier = modifier
356356
.fillMaxWidth()
357357
.wrapContentHeight()
358-
.padding(top = 8.dp, bottom = 16.dp, start = 14.dp, end = 20.dp)
358+
.padding(bottom = 16.dp, start = 20.dp, end = 16.dp)
359359
)
360360
{
361361
Row(

presentation/src/main/java/com/yapp/growth/presentation/component/PlanzTwoIconAppBar.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.yapp.growth.presentation.component
22

33
import androidx.compose.foundation.clickable
4-
import androidx.compose.foundation.layout.Box
5-
import androidx.compose.foundation.layout.fillMaxWidth
6-
import androidx.compose.foundation.layout.height
7-
import androidx.compose.foundation.layout.padding
4+
import androidx.compose.foundation.layout.*
85
import androidx.compose.foundation.shape.RoundedCornerShape
96
import androidx.compose.material.Icon
107
import androidx.compose.material.Text
@@ -52,8 +49,8 @@ private fun PlanzTwoIconAppBar(
5249
Box(
5350
modifier = modifier
5451
.fillMaxWidth()
55-
.height(76.dp)
56-
.padding(top = 20.dp)
52+
.wrapContentHeight()
53+
.padding(top = 20.dp, bottom = 15.dp)
5754
) {
5855

5956
Icon(

presentation/src/main/java/com/yapp/growth/presentation/firebase/DynamicLink.kt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ package com.yapp.growth.presentation.firebase
44
import android.content.Context
55
import android.content.Intent
66
import android.net.Uri
7-
import com.google.firebase.dynamiclinks.ktx.androidParameters
8-
import com.google.firebase.dynamiclinks.ktx.component1
9-
import com.google.firebase.dynamiclinks.ktx.component2
10-
import com.google.firebase.dynamiclinks.ktx.dynamicLinks
11-
import com.google.firebase.dynamiclinks.ktx.shortLinkAsync
7+
import com.google.firebase.dynamiclinks.ktx.*
128
import com.google.firebase.ktx.Firebase
139
import com.yapp.growth.presentation.BuildConfig
14-
import timber.log.Timber
1510

1611
const val DYNAMIC_LINK_PARAM = "dynamic_link_param"
1712
const val PLAN_ID_KEY_NAME = "planId"
@@ -27,12 +22,23 @@ fun getDeepLink(scheme: String, key: String?, id: String?): Uri {
2722
fun onDynamicLinkClick(
2823
context: Context,
2924
scheme: SchemeType,
30-
id: String? = null
25+
id: String? = null,
26+
thumbNailTitle: String,
27+
thumbNailDescription: String,
28+
thumbNailImageUrl: String,
3129
) {
3230
Firebase.dynamicLinks.shortLinkAsync {
3331
link = getDeepLink(scheme.name, scheme.key, id)
3432
domainUriPrefix = BuildConfig.PLANZ_FIREBASE_PREFIX
3533
androidParameters(context.packageName) { }
34+
iosParameters(context.packageName) {
35+
setFallbackUrl(Uri.parse("https://jalynne.notion.site/3379be16ecc04914bb98f8a57c980a46"))
36+
}
37+
socialMetaTagParameters {
38+
title = thumbNailTitle
39+
description = thumbNailDescription
40+
imageUrl = Uri.parse(thumbNailImageUrl)
41+
}
3642

3743
}.addOnSuccessListener { (shortLink, _) ->
3844
runCatching {
@@ -43,7 +49,7 @@ fun onDynamicLinkClick(
4349
context.startActivity(Intent.createChooser(sendIntent, "Share"))
4450
}
4551
.onFailure {
46-
Timber.tag("SHORTLINK").e(it)
52+
4753
}
4854
}
4955

presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/CreatePlanScreen.kt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@ package com.yapp.growth.presentation.ui.createPlan
22

33
import android.content.Intent
44
import androidx.compose.foundation.layout.padding
5+
import androidx.compose.material.MaterialTheme
56
import androidx.compose.material.Scaffold
6-
import androidx.compose.runtime.Composable
7+
import androidx.compose.runtime.*
78
import androidx.compose.ui.Modifier
9+
import androidx.compose.ui.graphics.Color
810
import androidx.navigation.NavHostController
911
import androidx.navigation.NavType
1012
import androidx.navigation.compose.NavHost
1113
import androidx.navigation.compose.composable
14+
import androidx.navigation.compose.currentBackStackEntryAsState
1215
import androidx.navigation.compose.rememberNavController
1316
import androidx.navigation.navArgument
17+
import com.google.accompanist.systemuicontroller.rememberSystemUiController
18+
import com.yapp.growth.presentation.theme.BackgroundColor1
1419
import com.yapp.growth.presentation.ui.createPlan.date.DateScreen
1520
import com.yapp.growth.presentation.ui.createPlan.share.ShareScreen
1621
import com.yapp.growth.presentation.ui.createPlan.theme.ThemeScreen
@@ -24,6 +29,22 @@ fun CreatePlanScreen(
2429
exitCreatePlan: () -> Unit,
2530
startShareActivity: (Intent) -> Unit,
2631
) {
32+
val navBackStackEntry by navController.currentBackStackEntryAsState()
33+
val currentDestination = navBackStackEntry?.destination
34+
35+
val systemUiController = rememberSystemUiController()
36+
val useDarkIcons = MaterialTheme.colors.isLight
37+
var statusBarColor: Color by remember { mutableStateOf(Color.White) }
38+
39+
statusBarColor = when (currentDestination?.route) {
40+
CreatePlanScreenRoute.SHARE.route -> {
41+
BackgroundColor1
42+
}
43+
else -> {
44+
Color.White
45+
}
46+
}
47+
2748
Scaffold { innerPadding ->
2849
NavHost(
2950
modifier = Modifier.padding(innerPadding),
@@ -92,6 +113,17 @@ fun CreatePlanScreen(
92113
}
93114
}
94115
}
116+
117+
SideEffect {
118+
systemUiController.setSystemBarsColor(
119+
color = statusBarColor,
120+
darkIcons = useDarkIcons
121+
)
122+
123+
systemUiController.setNavigationBarColor(
124+
color = BackgroundColor1
125+
)
126+
}
95127
}
96128

97129
enum class CreatePlanScreenRoute(val route: String) {

presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareScreen.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,14 @@ fun ShareScreen(
110110
}
111111
}
112112
}
113-
113+
114114
LaunchedEffect(Unit) {
115-
viewModel.getDynamicLink(context)
115+
viewModel.getDynamicLink(
116+
context = context,
117+
thumbNailTitle = context.getString(R.string.share_thumbnail_title),
118+
thumbNailDescription = context.getString(R.string.share_thumbnail_description),
119+
thumbNailImageUrl = BuildConfig.BASE_URL + context.getString(R.string.share_plan_share_feed_template_image_url)
120+
)
116121
}
117122

118123
LaunchedEffect(key1 = viewModel.effect) {

presentation/src/main/java/com/yapp/growth/presentation/ui/createPlan/share/ShareViewModel.kt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package com.yapp.growth.presentation.ui.createPlan.share
22

33
import android.content.Context
4+
import android.net.Uri
45
import androidx.lifecycle.SavedStateHandle
56
import com.google.firebase.dynamiclinks.ktx.*
67
import com.google.firebase.ktx.Firebase
78
import com.yapp.growth.base.BaseViewModel
89
import com.yapp.growth.presentation.BuildConfig
10+
import com.yapp.growth.presentation.R
911
import com.yapp.growth.presentation.firebase.SchemeType
1012
import com.yapp.growth.presentation.firebase.getDeepLink
1113
import com.yapp.growth.presentation.ui.createPlan.share.ShareContract.*
@@ -45,12 +47,23 @@ class ShareViewModel @Inject constructor(
4547
fun getDynamicLink(
4648
context: Context,
4749
scheme: SchemeType = SchemeType.RESPOND,
48-
id: String = planId.toString()
50+
id: String = planId.toString(),
51+
thumbNailTitle: String,
52+
thumbNailDescription: String,
53+
thumbNailImageUrl: String,
4954
) {
5055
Firebase.dynamicLinks.shortLinkAsync {
5156
link = getDeepLink(scheme.name, scheme.key, id)
5257
domainUriPrefix = BuildConfig.PLANZ_FIREBASE_PREFIX
5358
androidParameters(context.packageName) { }
59+
iosParameters(context.packageName) {
60+
setFallbackUrl(Uri.parse("https://jalynne.notion.site/3379be16ecc04914bb98f8a57c980a46"))
61+
}
62+
socialMetaTagParameters {
63+
title = thumbNailTitle
64+
description = thumbNailDescription
65+
imageUrl = Uri.parse(thumbNailImageUrl)
66+
}
5467

5568
}.addOnSuccessListener { (shortLink, _) ->
5669
updateState { copy(shareUrl = shortLink.toString()) }

0 commit comments

Comments
 (0)