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

Fix warning args warning #173

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@ class BuilderProcessor(
//TODO Use Koin 4.0 ViewModel DSL
@Deprecated("use isKoinComposeViewModelActive")
private fun isComposeViewModelActive(): Boolean {
logger.warn("[Deprecated] 'USE_COMPOSE_VIEWMODEL' arg is deprecated. Please use 'KOIN_USE_COMPOSE_VIEWMODEL'")
return options.getOrDefault(USE_COMPOSE_VIEWMODEL.name, "false") == true.toString()
val option = options.getOrDefault(USE_COMPOSE_VIEWMODEL.name, "false") == true.toString()
if (option) logger.warn("[Deprecated] 'USE_COMPOSE_VIEWMODEL' arg is deprecated. Please use 'KOIN_USE_COMPOSE_VIEWMODEL'")
return option
}

private fun isKoinComposeViewModelActive(): Boolean {
logger.warn("Activate Compose ViewModel for @KoinViewModel generation")
return options.getOrDefault(KOIN_USE_COMPOSE_VIEWMODEL.name, "false") == true.toString()
val option =
options.getOrDefault(KOIN_USE_COMPOSE_VIEWMODEL.name, "false") == true.toString()
if (option) logger.warn("Activate Compose ViewModel for @KoinViewModel generation")
return option
}

//TODO turn KOIN_DEFAULT_MODULE to false by default - Next Major version (breaking)
Expand Down
Loading