Skip to content

Commit

Permalink
Update CustomWebsiteViewModel.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel authored Dec 5, 2023
1 parent c711ba6 commit d7a16b1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import androidx.lifecycle.ViewModel
* This class is used to store the data for the CustomWebsiteActivity.
* The data is stored in a ViewModel so that it can survive configuration changes (like rotation).
* This class shound not be injected to the activity using a DI framework.
* Dagger forces the recreation of the [ViewModel] on configuration
* as oposed to using `by viewModels()` which remembers the last state.
*/
class CustomWebsiteViewModel : ViewModel() {

Expand Down Expand Up @@ -46,4 +48,4 @@ class CustomWebsiteViewModel : ViewModel() {
}
}

}
}

0 comments on commit d7a16b1

Please sign in to comment.