Skip to content

Commit

Permalink
[FEATURE]#205 : 프로필 업데이트 푸시 알림 수신시 화면 전환 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Nov 23, 2024
1 parent 26217e9 commit 08b84da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ private fun navigateScreenFromNavArgs(
navigator.navigateToVoteStorageScreen()
}

NotificationType.PROFILE_UPDATE -> {
navigator.navigateToProfileEditScreen()
}

NotificationType.IDLE -> {
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.bff.wespot

import androidx.navigation.NavController
import com.bff.wespot.entire.screen.destinations.ProfileEditScreenDestination
import com.bff.wespot.entire.screen.edit.ProfileEditNavArgs
import com.bff.wespot.message.screen.MessageScreenArgs
import com.bff.wespot.message.screen.destinations.MessageScreenDestination
import com.bff.wespot.message.screen.destinations.ReceiverSelectionScreenDestination
Expand Down Expand Up @@ -60,4 +62,8 @@ class NotificationNavigatorImpl(private val navController: NavController): Notif
override fun navigateToVoteStorageScreen() {
navController.navigate(VoteStorageScreenDestination within AppNavGraphs.vote)
}

override fun navigateToProfileEditScreen() {
navController.navigate(ProfileEditScreenDestination(ProfileEditNavArgs(false)) within AppNavGraphs.entire)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ interface NotificationNavigator {
isTodayVoteResult: Boolean,
)
fun navigateToVoteStorageScreen()
fun navigateToProfileEditScreen()
}

@OptIn(ExperimentalMaterial3Api::class)
Expand Down Expand Up @@ -154,6 +155,10 @@ fun NotificationScreen(
NotificationType.VOTE_RECEIVED -> {
navigator.navigateToVoteStorageScreen()
}

NotificationType.PROFILE_UPDATE -> {
navigator.navigateToProfileEditScreen()
}
}
}
}
Expand Down

0 comments on commit 08b84da

Please sign in to comment.