From da715f45cacea974f40ba4b4b69d6cbbcf5a1391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=B5=E1=86=B7=E1=84=8C=E1=85=B5=E1=86=AB?= =?UTF-8?q?=E1=84=8B=E1=85=AE?= Date: Mon, 11 Mar 2024 03:26:43 +0900 Subject: [PATCH] [fix] --- .../common/util/logevent/LogEventUtil.kt | 7 ++-- .../home/common/group/add/AddGroupScreen.kt | 10 ++++-- .../home/common/group/get/GetGroupScreen.kt | 10 ++++-- .../home/common/relation/RelationScreen.kt | 34 +++++++++++++------ .../common/relation/get/GetRelationScreen.kt | 16 ++++++--- .../ui/main/home/history/HistoryPageScreen.kt | 6 ++-- .../ui/main/home/history/HistoryScreen.kt | 32 +++++++++++------ .../registration/HistoryRegistrationScreen.kt | 32 +++++++++++------ .../ui/main/login/main/LoginMainScreen.kt | 10 ++++-- .../login/onboarding/LoginOnBoardingScreen.kt | 34 +++++++++++++------ .../main/RegistrationMainScreen.kt | 10 ++++-- 11 files changed, 137 insertions(+), 64 deletions(-) diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/common/util/logevent/LogEventUtil.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/common/util/logevent/LogEventUtil.kt index 16615f9b..49200653 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/common/util/logevent/LogEventUtil.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/common/util/logevent/LogEventUtil.kt @@ -1,15 +1,16 @@ package ac.dnd.mour.android.presentation.common.util.logevent +import com.google.firebase.analytics.ParametersBuilder import com.google.firebase.analytics.ktx.analytics import com.google.firebase.analytics.logEvent import com.google.firebase.ktx.Firebase fun viewLogEvent( eventName: String, - screenName: String + block: ParametersBuilder.() -> Unit ) { - Firebase.analytics.logEvent(eventName) { - param(screenName, screenName) + Firebase.analytics.logEvent(eventName){ + block() } } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/add/AddGroupScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/add/AddGroupScreen.kt index e1ed8f1b..31e5d9d1 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/add/AddGroupScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/add/AddGroupScreen.kt @@ -79,7 +79,9 @@ fun AddGroupScreen( LaunchedEffect(Unit) { viewLogEvent( LogEventUtil.VIEW_ADD_NEW_GROUP, - LogEventUtil.VIEW_ADD_NEW_GROUP + block = { + + } ) } @@ -203,8 +205,10 @@ private fun AddGroupScreen( isEnabled = text.isNotEmpty(), onClick = { viewLogEvent( - LogEventUtil.VIEW_ADD_NEW_GROUP, - LogEventUtil.CLICK_REGISTRATION_ADD_NEW_GROUP + LogEventUtil.CLICK_REGISTRATION_ADD_NEW_GROUP, + block = { + + } ) intent(AddGroupIntent.OnConfirm(text)) } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/get/GetGroupScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/get/GetGroupScreen.kt index 39c21f80..c7f70c35 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/get/GetGroupScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/group/get/GetGroupScreen.kt @@ -93,7 +93,9 @@ fun GetGroupScreen( LaunchedEffect(Unit) { viewLogEvent( LogEventUtil.VIEW_EDIT_GROUP, - LogEventUtil.VIEW_EDIT_GROUP + block = { + + } ) } @@ -309,8 +311,10 @@ private fun GetGroupScreen( modifier = Modifier .clickable { viewLogEvent( - LogEventUtil.VIEW_EDIT_GROUP, - LogEventUtil.CLICK_SAVE_GROUP_EDIT_GROUP + LogEventUtil.CLICK_SAVE_GROUP_EDIT_GROUP, + block = { + + } ) isShowingAddGroupSheet = true } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/RelationScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/RelationScreen.kt index ab8bb883..85b0df44 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/RelationScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/RelationScreen.kt @@ -128,7 +128,9 @@ fun RelationScreen( if (relationType == RelationType.ADD) { viewLogEvent( LogEventUtil.VIEW_RELATION, - LogEventUtil.VIEW_RELATION + block = { + + } ) } } @@ -402,8 +404,10 @@ fun RelationScreen( isNameTypeTyping = true if (relationType == RelationType.ADD) { viewLogEvent( - LogEventUtil.VIEW_RELATION, - LogEventUtil.CLICK_DIRECT_INPUT_RELATION + LogEventUtil.CLICK_DIRECT_INPUT_RELATION, + block = { + + } ) } } @@ -420,8 +424,10 @@ fun RelationScreen( isNameTypeTyping = false if (relationType == RelationType.ADD) { viewLogEvent( - LogEventUtil.VIEW_RELATION, - LogEventUtil.CLICK_KAKAO_RELATION + LogEventUtil.CLICK_KAKAO_RELATION, + block = { + + } ) } } @@ -622,8 +628,10 @@ fun RelationScreen( .clickable { if (relationType == RelationType.ADD) { viewLogEvent( - LogEventUtil.VIEW_RELATION, - LogEventUtil.CLICK_EDIT_RELATION + LogEventUtil.CLICK_EDIT_RELATION, + block = { + + } ) } isShowingGetGroup = true @@ -838,8 +846,10 @@ fun RelationScreen( if (checkSubmitState()) { isRecordState = true viewLogEvent( - LogEventUtil.VIEW_RELATION, - LogEventUtil.CLICK_MONEY_RELATION + LogEventUtil.CLICK_MONEY_RELATION, + block = { + + } ) intent( if (currentImageName.isEmpty()) { @@ -880,8 +890,10 @@ fun RelationScreen( onClick = { if (checkSubmitState()) { viewLogEvent( - LogEventUtil.VIEW_RELATION, - LogEventUtil.CLICK_SAVE_RELATION + LogEventUtil.CLICK_SAVE_RELATION, + block = { + + } ) intent( if (currentImageName.isEmpty()) { diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/get/GetRelationScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/get/GetRelationScreen.kt index e8379452..a53f9324 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/get/GetRelationScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/common/relation/get/GetRelationScreen.kt @@ -109,7 +109,9 @@ fun SearchRelationScreen( LaunchedEffect(Unit){ viewLogEvent( LogEventUtil.VIEW_SELECT_NAME, - LogEventUtil.VIEW_SELECT_NAME + block = { + + } ) } @@ -284,8 +286,10 @@ private fun SearchRelationScreen( .clip(Shapes.medium) .clickable { viewLogEvent( - LogEventUtil.VIEW_SELECT_NAME, - LogEventUtil.CLICK_SAVE_RELATION_SELECT_NAME + LogEventUtil.CLICK_SAVE_RELATION_SELECT_NAME, + block = { + + } ) navigateToEditRelation() } @@ -399,8 +403,10 @@ private fun SearchRelationScreen( isEnabled = selectedRelation != null, onClick = { viewLogEvent( - LogEventUtil.VIEW_SELECT_NAME, - LogEventUtil.CLICK_SELECION_NAME + LogEventUtil.CLICK_SELECION_NAME, + block = { + + } ) selectedRelation?.let { relation -> onResult(relation) diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryPageScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryPageScreen.kt index 53a112d7..9bc40b5c 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryPageScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryPageScreen.kt @@ -414,8 +414,10 @@ private fun EmptyRelationView( .clickable { onRecord() viewLogEvent( - LogEventUtil.VIEW_MAIN, - LogEventUtil.CLICK_PLUSBTN_MAIN + LogEventUtil.CLICK_PLUSBTN_MAIN, + block = { + + } ) } .border( diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryScreen.kt index cf65919c..2d281c35 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/HistoryScreen.kt @@ -155,7 +155,9 @@ private fun HistoryScreen( LaunchedEffect(Unit){ viewLogEvent( LogEventUtil.VIEW_MAIN, - LogEventUtil.VIEW_MAIN + block = { + + } ) } @@ -537,8 +539,10 @@ private fun HistoryScreen( .clip(RoundedCornerShape(100.dp)) .clickable { viewLogEvent( - LogEventUtil.VIEW_FAB_BUTTON_MAIN, - LogEventUtil.CLICK_MONEY_MAIN + LogEventUtil.CLICK_MONEY_MAIN, + block = { + + } ) isDropDownMenuExpanded = false if (isNotEmptyRelation) { @@ -588,8 +592,10 @@ private fun HistoryScreen( .clip(RoundedCornerShape(100.dp)) .clickable { viewLogEvent( - LogEventUtil.VIEW_FAB_BUTTON_MAIN, - LogEventUtil.CLICK_RELATION_MAIN + LogEventUtil.CLICK_RELATION_MAIN, + block = { + + } ) isDropDownMenuExpanded = false navigateToAddRelation() @@ -639,17 +645,23 @@ private fun HistoryScreen( isDropDownMenuExpanded = !isDropDownMenuExpanded if(isDropDownMenuExpanded){ viewLogEvent( - LogEventUtil.VIEW_FAB_BUTTON_MAIN, - LogEventUtil.CLICK_CLOSE_MAIN + LogEventUtil.CLICK_CLOSE_MAIN, + block = { + + } ) }else{ viewLogEvent( - LogEventUtil.VIEW_MAIN, - LogEventUtil.CLICK_PLUSFLOATING_MAIN + LogEventUtil.CLICK_PLUSFLOATING_MAIN, + block = { + + } ) viewLogEvent( LogEventUtil.VIEW_FAB_BUTTON_MAIN, - LogEventUtil.VIEW_FAB_BUTTON_MAIN + block = { + + } ) } } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/registration/HistoryRegistrationScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/registration/HistoryRegistrationScreen.kt index 4dcd5c7b..147d4e17 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/registration/HistoryRegistrationScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/home/history/registration/HistoryRegistrationScreen.kt @@ -145,13 +145,17 @@ fun HistoryRegistrationScreen( HistoryRegistrationType.TAKE -> { viewLogEvent( LogEventUtil.VIEW_MONEY_TAKE, - LogEventUtil.VIEW_MONEY_TAKE + block = { + + } ) } HistoryRegistrationType.GIVE -> { viewLogEvent( LogEventUtil.VIEW_MONEY_GIVE, - LogEventUtil.VIEW_MONEY_GIVE + block = { + + } ) } } @@ -449,14 +453,18 @@ fun HistoryRegistrationScreen( when(historyTypeState){ HistoryRegistrationType.TAKE -> { viewLogEvent( - LogEventUtil.VIEW_MONEY_TAKE, - LogEventUtil.CLICK_NEXT_SAVE_TAKE + LogEventUtil.CLICK_NEXT_SAVE_TAKE, + block = { + + } ) } HistoryRegistrationType.GIVE -> { viewLogEvent( - LogEventUtil.VIEW_MONEY_GIVE, - LogEventUtil.CLICK_NEXT_SAVE_GIVE + LogEventUtil.CLICK_NEXT_SAVE_GIVE, + block = { + + } ) } } @@ -489,14 +497,18 @@ fun HistoryRegistrationScreen( when(historyTypeState){ HistoryRegistrationType.TAKE -> { viewLogEvent( - LogEventUtil.VIEW_MONEY_TAKE, - LogEventUtil.CLICK_SAVE_TAKE + LogEventUtil.CLICK_SAVE_TAKE, + block = { + + } ) } HistoryRegistrationType.GIVE -> { viewLogEvent( - LogEventUtil.VIEW_MONEY_GIVE, - LogEventUtil.CLICK_SAVE_GIVE + LogEventUtil.CLICK_SAVE_GIVE, + block = { + + } ) } } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/main/LoginMainScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/main/LoginMainScreen.kt index 83e5f392..a75c8672 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/main/LoginMainScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/main/LoginMainScreen.kt @@ -74,7 +74,9 @@ fun LoginMainScreen( LaunchedEffect(Unit){ viewLogEvent( LogEventUtil.VIEW_LOG_IN, - LogEventUtil.VIEW_LOG_IN + block = { + + } ) } @@ -208,8 +210,10 @@ fun LoginMainScreen( ) .clickable { viewLogEvent( - LogEventUtil.VIEW_LOG_IN, - LogEventUtil.CLICK_KAKAO_LOG_IN + LogEventUtil.CLICK_KAKAO_LOG_IN, + block = { + + } ) if (model.state == LoginMainState.Init) { loginWithKakao( diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/onboarding/LoginOnBoardingScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/onboarding/LoginOnBoardingScreen.kt index c57794dc..f0ee9b3b 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/onboarding/LoginOnBoardingScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/login/onboarding/LoginOnBoardingScreen.kt @@ -73,21 +73,27 @@ fun LoginOnBoardingScreen( 0 -> { viewLogEvent( LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.VIEW_ONBOARDING + block = { + + } ) } 1 -> { viewLogEvent( - LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.VIEW_ONBOARDING_SECOND + LogEventUtil.VIEW_ONBOARDING_SECOND, + block = { + + } ) } 2 -> { viewLogEvent( - LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.VIEW_ONBOARDING_THIRD + LogEventUtil.VIEW_ONBOARDING_THIRD, + block = { + + } ) } } @@ -160,22 +166,28 @@ fun LoginOnBoardingScreen( when (pagerState.currentPage) { 0 -> { viewLogEvent( - LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.CLICK_NEXT_ONBOARDING + LogEventUtil.CLICK_NEXT_ONBOARDING, + block = { + + } ) } 1 -> { viewLogEvent( - LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.CLICK_NEXT_ONBOARDING_SECOND + LogEventUtil.CLICK_NEXT_ONBOARDING_SECOND, + block = { + + } ) } 2 -> { viewLogEvent( - LogEventUtil.VIEW_ONBOARDING, - LogEventUtil.CLICK_NEXT_ONBOARDING_THIRD + LogEventUtil.CLICK_NEXT_ONBOARDING_THIRD, + block = { + + } ) } } diff --git a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/registration/main/RegistrationMainScreen.kt b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/registration/main/RegistrationMainScreen.kt index 4b4dd29a..3c084760 100644 --- a/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/registration/main/RegistrationMainScreen.kt +++ b/presentation/src/main/kotlin/ac/dnd/mour/android/presentation/ui/main/registration/main/RegistrationMainScreen.kt @@ -95,7 +95,9 @@ fun RegistrationNamingScreen( LaunchedEffect(Unit){ viewLogEvent( LogEventUtil.VIEW_REQUIRED_INFO, - LogEventUtil.VIEW_REQUIRED_INFO + block = { + + } ) } @@ -516,8 +518,10 @@ fun RegistrationNamingScreen( ) ) viewLogEvent( - LogEventUtil.VIEW_REQUIRED_INFO, - LogEventUtil.CLICK_START_REQUIRED_INFO + LogEventUtil.CLICK_START_REQUIRED_INFO, + block = { + + } ) } },