Skip to content

Commit

Permalink
fix: 공지사항 네비게이션 수정 (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhz committed Aug 30, 2024
1 parent ae490b8 commit d761b8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.easyhz.noffice.core.common.base.UiSideEffect

sealed class MenuSideEffect: UiSideEffect() {
data class NavigateToInquiry(val uri: Uri): MenuSideEffect()
data object NavigateToNotice: MenuSideEffect()
data class NavigateToNotice(val uri: Uri): MenuSideEffect()
data object NavigateToServiceOfTerms: MenuSideEffect()
data object NavigateToPrivacyPolicy: MenuSideEffect()
data object NavigateToConsentToInformation: MenuSideEffect()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package com.easyhz.noffice.feature.my_page.screen

import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.Settings
import androidx.annotation.RequiresApi
import androidx.lifecycle.viewModelScope
import com.easyhz.noffice.core.common.base.BaseViewModel
import com.easyhz.noffice.core.common.error.handleError
Expand All @@ -12,11 +17,13 @@ import com.easyhz.noffice.feature.my_page.contract.menu.MenuSideEffect
import com.easyhz.noffice.feature.my_page.contract.menu.MenuState
import com.easyhz.noffice.feature.my_page.util.MyPageMenu
import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
class MyPageMenuViewModel @Inject constructor(
@ApplicationContext private val context: Context,
private val logoutUseCase: LogoutUseCase
): BaseViewModel<MenuState, MenuIntent, MenuSideEffect>(
initialState = MenuState.init()
Expand Down Expand Up @@ -54,7 +61,8 @@ class MyPageMenuViewModel @Inject constructor(
}

private fun handleNoticeMenu() {
postSideEffect { MenuSideEffect.NavigateToNotice }
val uri = Uri.parse("https://gkftndltek.notion.site/Noffice-accc5b9fc84941de9625e45da03d4ab8?pvs=4")
postSideEffect { MenuSideEffect.NavigateToNotice(uri) }
}

private fun handleTermsOfService() {
Expand Down

0 comments on commit d761b8b

Please sign in to comment.