This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter android:autoVerify="true"> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<!-- Supported schemes --> | |
<data android:scheme="moove" /> | |
<!-- Corporate subdomains --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivityViewModel( | |
exceptionHandler: ExceptionHandler, | |
private val getDeeplinkUseCase: GetDeeplinkUseCase, | |
) : ViewModel(), ContainerHost<MainActivityState, MainActivityEffect> { | |
/* ... */ | |
fun handleIntent(intent: Intent?) = intent { | |
if (intent == null) return@intent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
private val mainViewModel: MainActivityViewModel by viewModel() | |
/* ... */ | |
override fun onCreate(savedInstanceState: Bundle?) { | |
/* ... */ | |
mainViewModel.handleIntent(intent) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val mainModule = module { | |
factory { | |
AppNavigator(navController = get()) | |
} binds arrayOf( | |
ScreenNavigator::class, | |
GlobalAppNavigator::class, | |
TicketsNavigator::class, | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GetDeeplinkUseCase( | |
private val deeplinkRepository: DeeplinkRepository, | |
private val getDynamicLinkUseCase: GetDynamicLinkUseCase, | |
) { | |
suspend operator fun invoke(uri: String): DeepLink { | |
val parsedUri = getDynamicLinkUseCase(uri) ?: uri | |
val deepLink = deeplinkRepository.getDeepLink(parsedUri) | |
return deepLink | |
} | |
} |
NewerOlder