Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 780 Bytes

Development.md

File metadata and controls

45 lines (31 loc) · 780 Bytes

Testing

  1. With and without internet

UI Checklist

  1. Minimum space between content and bottom of the window
  2. List position is preserved on back

Code Templates

Interaction between ViewModel and Service

class ViewModel(private val service: Service) {

    init {
        service.itemsStateObservable.subscribeIO {
            ...
        }
        service.start()
    }

    override fun onCleared() {
        service.stop()
    }
}

class Service {
    private val itemsStateSubject = BehaviorSubject.create<DataState<Any>>()
    val itemsStateObservable: Observable<DataState<Any>> = itemsStateSubject

    private disposables = CompositeDisposables()

    fun start() {
        ...
    }

    fun stop() {
        disposables.clear()
    }
}