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

Feature: viewmodel-lifecycle-rxkotlin2/rxkotlin3 modules #3

Merged
merged 4 commits into from Feb 3, 2022

Conversation

skydoves
Copy link
Owner

@skydoves skydoves commented Feb 3, 2022

Overview

Introduce a new extension autoDisposable.. autoDisposable creates a [Disposable] read-only delegate property, which will call the Disposable.dispose() when the ViewModel is cleared.

class SecondViewModel : ViewModel() {

  // The compositeDisposable will be called `dispose` automatically when the VeiwModel is cleared.
  val compositeDisposable by autoDisposable(CompositeDisposable())

#2

@skydoves skydoves self-assigned this Feb 3, 2022
@skydoves skydoves merged commit a11ac11 into main Feb 3, 2022
@skydoves skydoves deleted the feature/rxkotlin branch February 3, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant