Fix crash in SubmitDebugLogActivity.
This commit is contained in:
parent
e1a90bcb00
commit
3b601896d2
1 changed files with 3 additions and 3 deletions
|
@ -20,14 +20,14 @@ public class SubmitDebugLogViewModel extends ViewModel {
|
||||||
|
|
||||||
private final SubmitDebugLogRepository repo;
|
private final SubmitDebugLogRepository repo;
|
||||||
private final DefaultValueLiveData<List<LogLine>> lines;
|
private final DefaultValueLiveData<List<LogLine>> lines;
|
||||||
private final DefaultValueLiveData<Mode> mode;
|
private final MutableLiveData<Mode> mode;
|
||||||
|
|
||||||
private List<LogLine> sourceLines;
|
private List<LogLine> sourceLines;
|
||||||
|
|
||||||
private SubmitDebugLogViewModel() {
|
private SubmitDebugLogViewModel() {
|
||||||
this.repo = new SubmitDebugLogRepository();
|
this.repo = new SubmitDebugLogRepository();
|
||||||
this.lines = new DefaultValueLiveData<>(Collections.emptyList());
|
this.lines = new DefaultValueLiveData<>(Collections.emptyList());
|
||||||
this.mode = new DefaultValueLiveData<>(Mode.NORMAL);
|
this.mode = new MutableLiveData<>();
|
||||||
|
|
||||||
repo.getLogLines(result -> {
|
repo.getLogLines(result -> {
|
||||||
sourceLines = result;
|
sourceLines = result;
|
||||||
|
@ -94,7 +94,7 @@ public class SubmitDebugLogViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean onBackPressed() {
|
boolean onBackPressed() {
|
||||||
if (mode.getValue().equals(Mode.EDIT)) {
|
if (mode.getValue() == Mode.EDIT) {
|
||||||
mode.setValue(Mode.NORMAL);
|
mode.setValue(Mode.NORMAL);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue