Yeah, I see I misunderstood completely. This shoul...
# rx
a
Yeah, I see I misunderstood completely. This should be better:
Copy code
actions.ofType<Action.AddNote>()
                .switchMapSingle { note ->
                    Single.fromCallable { Note(text = note.nodeText) }
                            .flatMapCompletable { addNoteUseCase.add(it) }
                            .subscribeOn(<http://Schedulers.io|Schedulers.io>())
                            .toSingleDefault<Change>(Change.NoteAddSuccess)
                            .onErrorReturn { Change.NoteAddError(it) }
                }