Slide 36
Slide 36 text
3Y+BWB
val compositeDisposable = CompositeDisposable()
fun createEntry(title: String, body: String) = Completable.create { emitter ->
val entry = Entry(title = title, body = body, date = Date())
entryDao.insertEntry(entry)
emitter.onComplete()
}
fun create() {
val disposable = createEntry(
"ࠓͷه",
"ࠓͷ൩͝൧ϋϯόʔάͩͬͨɻ͓͍͔ͬͨ͠ɻ")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe()
compositeDisposable.add(disposable)
}