then ``` fun refresh() { callTheApi() ...
# android-architecture
u
then
Copy code
fun refresh() {
        callTheApi()
            .flatMap( insertNewDataToDb ) <------------- queryDataObservable emits automatically after this line
            .map {Status.SUCCESS}
            .startWith(Status.STARTED)
            .subscribe(statusRelay)
    }