Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#151 : 2차 배포 전 버그 수정 #152

Merged
merged 7 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading