Skip to content

Commit

Permalink
Merge pull request #157 from YAPP-Github/release/r1.0.3
Browse files Browse the repository at this point in the history
release 1.0.3 버전배포 및 오류수정
  • Loading branch information
KwonDae authored Jul 31, 2022
2 parents 08f5370 + c141956 commit 10e4cc6
Show file tree
Hide file tree
Showing 15 changed files with 166 additions and 98 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Configs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ private fun PlanzColorTextAppBar(
Box(
modifier = modifier
.fillMaxWidth()
.height(80.dp)
.wrapContentHeight()
.padding(vertical = 24.dp)
) {

Text(
Expand Down Expand Up @@ -228,4 +229,4 @@ fun PreviewPlanzColorTextWithExitAppBar() {
title = "식사",
onExitClick = { }
)
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -43,7 +49,7 @@ fun onDynamicLinkClick(
context.startActivity(Intent.createChooser(sendIntent, "Share"))
}
.onFailure {
Timber.tag("SHORTLINK").e(it)

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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),
Expand Down Expand Up @@ -92,6 +113,17 @@ fun CreatePlanScreen(
}
}
}

SideEffect {
systemUiController.setSystemBarsColor(
color = statusBarColor,
darkIcons = useDarkIcons
)

systemUiController.setNavigationBarColor(
color = BackgroundColor1
)
}
}

enum class CreatePlanScreenRoute(val route: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.*
Expand Down Expand Up @@ -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()) }
Expand Down
Loading

0 comments on commit 10e4cc6

Please sign in to comment.