-
Notifications
You must be signed in to change notification settings - Fork 61
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
Issue #553: Add AndroidX ViewModel integration as separate module #598
Conversation
...el/src/main/kotlin/com/bumble/appyx/utils/viewmodel/ActivityIntegrationPointWithViewModel.kt
Fixed
Show fixed
Hide fixed
utils/viewmodel/src/main/kotlin/com/bumble/appyx/utils/viewmodel/sample/MyViewModel.kt
Fixed
Show fixed
Hide fixed
utils/viewmodel/src/main/kotlin/com/bumble/appyx/utils/viewmodel/IntegrationPointViewModel.kt
Fixed
Show fixed
Hide fixed
...el/src/main/kotlin/com/bumble/appyx/utils/viewmodel/ActivityIntegrationPointWithViewModel.kt
Outdated
Show resolved
Hide resolved
utils/viewmodel/src/main/kotlin/com/bumble/appyx/utils/viewmodel/IntegrationPointViewModel.kt
Outdated
Show resolved
Hide resolved
import androidx.lifecycle.viewModelScope | ||
import kotlinx.coroutines.launch | ||
|
||
class MyViewModel : IntegrationPointViewModel() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move it to samples otherwise this code will be shipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, let's create a proper sample in the demo modules
utils/viewmodel/src/main/kotlin/com/bumble/appyx/utils/viewmodel/node/ViewModelNode.kt
Outdated
Show resolved
Hide resolved
...el/src/main/kotlin/com/bumble/appyx/utils/viewmodel/ActivityIntegrationPointWithViewModel.kt
Outdated
Show resolved
Hide resolved
...el/src/main/kotlin/com/bumble/appyx/utils/viewmodel/ActivityIntegrationPointWithViewModel.kt
Outdated
Show resolved
Hide resolved
...navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/viewModel/MyViewModel.kt
Outdated
Show resolved
Hide resolved
...ewmodel-android/src/main/kotlin/com/bumble/appyx/utils/viewmodel/node/ViewModelParentNode.kt
Fixed
Show fixed
Hide fixed
...ewmodel-android/src/main/kotlin/com/bumble/appyx/utils/viewmodel/node/ViewModelParentNode.kt
Outdated
Show resolved
Hide resolved
lifecycle = AndroidLifecycle(LocalLifecycleOwner.current.lifecycle), | ||
integrationPoint = appyxV2IntegrationPoint, | ||
) { | ||
node(buildContext = it) { modifier -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create an example where we use ViewModelNode
...n/android/src/main/kotlin/com/bumble/appyx/navigation/node/viewModel/ViewModelNodeExample.kt
Fixed
Show fixed
Hide fixed
25a0dba
to
7206271
Compare
|
||
@ExperimentalUnitApi | ||
@ExperimentalAnimationApi | ||
@ExperimentalComposeUiApi | ||
class MainActivity : NodeActivity() { | ||
class MainActivity : ViewModelNodeActivity() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should revert this
Description
...
Check list
CHANGELOG.md
if required.