Last active
May 1, 2023 10:13
-
-
Save tfcporciuncula/5b045fd65e8ee3776b65b077685e3b06 to your computer and use it in GitHub Desktop.
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
actual abstract class ViewModel { | |
actual val viewModelScope = MainScope() | |
protected actual open fun onCleared() {} | |
fun clear() { | |
onCleared() | |
viewModelScope.cancel() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment