Skip to content

Commit

Permalink
Revert "fix : [딥 링크] 이후 뒤로 가기시 홈이 아닌 티켓 탭이 나오는 현상 수정"
Browse files Browse the repository at this point in the history
  • Loading branch information
HamBP authored Dec 29, 2024
1 parent ed5f84b commit 98d2d3d
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.nexters.boolti.presentation.screen.home

import android.content.Context
import android.content.Intent
import android.net.Uri
import android.widget.Toast
Expand Down Expand Up @@ -78,8 +77,6 @@ fun HomeScreen(

var dialog: GiftStatus? by rememberSaveable { mutableStateOf(null) }

removeInvalidDeepLink(LocalContext.current)

LaunchedEffect(Unit) {
viewModel.events.collect { event ->
when (event) {
Expand Down Expand Up @@ -209,19 +206,6 @@ fun HomeScreen(
}
}

/**
* issue #209를 해결하기 위한 메서드.
* 처리하지 말아야 할 deep link가 부적절한 destination과 match되는 것을 방지하기 위함.
*/
private fun removeInvalidDeepLink(context: Context) {
runCatching {
val intent = context.requireActivity().intent
if (intent.action == null) return
val deepLink = intent.action!!
if (!deepLink.contains("home")) intent.setAction(null)
}
}

@Stable
private enum class Destination(
val route: String,
Expand Down

0 comments on commit 98d2d3d

Please sign in to comment.