Commit 6020eaf7 authored by Tiago Cunha's avatar Tiago Cunha

Crashing bug

parent 8f0ddf91
......@@ -210,8 +210,9 @@ public class RoomPresenter extends BasePresenter<RoomContract.View>
final Disposable subscription = userRepository.getCurrent()
.filter(Optional::isPresent)
.map(Optional::get)
.filter(user -> user.getSettings() != null)
.map(User::getSettings)
.filter(settings -> settings != null)
.filter(settings -> settings.getPreferences() != null)
.map(Settings::getPreferences)
.distinctUntilChanged()
.subscribeOn(AndroidSchedulers.from(BackgroundLooper.get()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment