Skip to content

Commit

Permalink
Merge pull request #152 from YAPP-Github/feature/jaino/#151
Browse files Browse the repository at this point in the history
#151 : 2차 배포 전 버그 수정
  • Loading branch information
jeongjaino authored Sep 6, 2024
2 parents 0c1f1cf + 8463dda commit 69fa976
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
5 changes: 5 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/CommonNavGraphNavigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.bff.wespot.entire.screen.EntireNavigator
import com.bff.wespot.entire.screen.destinations.AccountSettingScreenDestination
import com.bff.wespot.entire.screen.destinations.BlockListScreenDestination
import com.bff.wespot.entire.screen.destinations.CharacterEditScreenDestination
import com.bff.wespot.entire.screen.destinations.EntireScreenDestination
import com.bff.wespot.entire.screen.destinations.NotificationSettingScreenDestination
import com.bff.wespot.entire.screen.destinations.ProfileEditScreenDestination
import com.bff.wespot.entire.screen.destinations.RevokeConfirmScreenDestination
Expand Down Expand Up @@ -162,4 +163,8 @@ class CommonNavGraphNavigator(
override fun navigateToProfileEditScreen(args: ProfileEditNavArgs) {
navController.navigate(ProfileEditScreenDestination(args) within navGraph)
}

override fun navigateToEntireScreen() {
navController.navigate(EntireScreenDestination within navGraph)
}
}
10 changes: 5 additions & 5 deletions app/src/main/kotlin/com/bff/wespot/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
requestNotificationPermission()
checkEnteredFromPushNotification()

val navArgs = getMainScreenArgsFromIntent()
checkEnteredFromPushNotification(navArgs)

setContent {
WeSpotTheme {
MainScreen(
navigator = navigator,
navArgs = getMainScreenArgsFromIntent(),
navArgs = navArgs,
analyticsHelper = analyticsHelper,
viewModel = viewModel,
)
Expand All @@ -137,9 +139,7 @@ class MainActivity : ComponentActivity() {
}
}

private fun checkEnteredFromPushNotification() {
val data = getMainScreenArgsFromIntent()

private fun checkEnteredFromPushNotification(data: MainScreenNavArgs) {
if (data.type != NotificationType.IDLE) {
viewModel.onAction(MainAction.OnEnteredByPushNotification(data))
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.bff.wespot.model.notification

import java.time.LocalDate
import java.time.LocalDateTime

data class Notification(
val id: Int,
val type: NotificationType,
val userId: String,
val date: LocalDate,
val targetId: Int,
val content: String,
val isNew: Boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.bff.wespot.data.remote.model.notification

import com.bff.wespot.data.remote.extensions.toISOLocalDateTime
import com.bff.wespot.data.remote.extensions.toLocalDateFromDashPattern
import com.bff.wespot.model.notification.Notification
import com.bff.wespot.model.notification.NotificationList
import com.bff.wespot.model.notification.NotificationType
Expand All @@ -24,7 +25,7 @@ data class NotificationListDto(
data class NotificationDto (
val id: Int,
val type: String,
val userId: String,
val date: String,
val targetId: Int,
val content: String,
val isNew: Boolean,
Expand All @@ -34,7 +35,7 @@ data class NotificationDto (
fun toNotification(): Notification = Notification(
id = id,
type = type.convertToNotificationType(),
userId = userId,
date = date.toLocalDateFromDashPattern(),
targetId = targetId,
content = content,
isNew = isNew,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect

interface ProfileEditNavigator {
fun navigateUp()
fun navigateToEntireScreen()
fun navigateToCharacterEditScreen()
}

Expand Down Expand Up @@ -111,7 +111,7 @@ fun ProfileEditScreen(
WSTopBar(
title = stringResource(id = R.string.profile_edit),
canNavigateBack = true,
navigateUp = { navigator.navigateUp() },
navigateUp = { navigator.navigateToEntireScreen() },
)
},
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ fun VoteResultScreen(
id = R.string.real_time_vote,
),
),
selectedItemIndex = voteType,
onSelectedChanged = { voteType = it },
selectedItemIndex = voteType xor 1,
onSelectedChanged = { voteType = it xor 1 },
)
}

Expand Down Expand Up @@ -665,5 +665,5 @@ private fun EmptyTile(
}

private const val MIN_REQUIREMENT = 5
private const val TODAY = 1
private const val YESTERDAY = 0
private const val TODAY = 0
private const val YESTERDAY = 1
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
compileSdk = "34"
minSdk = "26"
targetSdk = "34"
versionName = "1.0.0"
versionCode = "1"
versionName = "1.1.0"
versionCode = "3"

gradle-plugin = "8.5.1"
kotlin = "2.0.0"
Expand Down

0 comments on commit 69fa976

Please sign in to comment.