Created
July 29, 2020 21:37
-
-
Save marcherdiego/7f8286bb46b28a5839b5492d05e2c6b8 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
class MainModel { | |
fun doBackgroundWork() { | |
object : AsyncTask<Unit, Unit, Unit>() { | |
override fun doInBackground(vararg params: Unit?) { | |
// Heavy work | |
} | |
override fun onPostExecute(result: Unit?) { | |
bus.post(ServerCallCompletedEvent()) | |
} | |
}.execute() | |
} | |
class ServerCallCompletedEvent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment