package org.lagonette.app.app.widget.livedata;

import android.arch.lifecycle.LiveData;
import android.support.annotation.NonNull;
import android.util.Log;

import org.lagonette.app.app.widget.coordinator.state.MainState;
import org.lagonette.app.app.widget.performer.state.BottomSheetFragmentType;

public class MainStateLiveData
        extends LiveData<MainState> {

    private static final String TAG = "MainCoordinatorStateLiv";

    @NonNull
    private MainState mState;

    public MainStateLiveData(@NonNull MainState state) {
        mState = state;
    }

    public void notifyMapMovementChanged(@MainState.Movement int newMovement) {
        Log.d(TAG, "State <- Map movement " + newMovement);
        mState.mapMovement = newMovement;
        setValue(mState);
    }

    public void notifyBottomSheetStateChanged(@MainState.State int newState) {
        Log.d(TAG, "State <- Bottom sheet state " + newState);
        mState.bottomSheetState = newState;
        setValue(mState);
    }

    public void notifyBottomSheetFragmentChanged(@NonNull BottomSheetFragmentType newFragmentType) {
        Log.d(TAG, "State <- Bottom sheet fragment " + newFragmentType);
        mState.bottomSheetFragmentType = newFragmentType;
        setValue(mState);
    }

}

@@ -124,16 +124,60 @@
 onNull;%0A
+import android.support.annotation.Nullable;%0A
 import a
@@ -597,32 +597,257 @@
 = state;%0A    %7D%0A%0A
+    // TODO Workaround%0A    @Nullable%0A    @Override%0A    public MainState getValue() %7B%0A        MainState value = super.getValue();%0A        if (value == null) %7B%0A            value = mState;%0A        %7D%0A        return value;%0A    %7D%0A%0A
     public void 

Make MainStateLiveData#getValue return a not null value