diff --git a/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java b/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java index 9dc9ef3..3d5c62f 100644 --- a/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java +++ b/app/src/main/java/org/ntlab/irisclient/viewmodels/DrawingStateViewModel.java @@ -33,7 +33,7 @@ final private Retrofit retrofit; private Integer drawingStatePreData; private Integer dnoPreData = null; - private Integer timerPreData; + private Integer timerPreData = null; private String drawingPreData; private List keywords; @@ -125,7 +125,6 @@ }); } - // public void updateTimer(String rid) { // // final DrawingRest drawingRest = retrofit.create(DrawingRest.class); @@ -135,8 +134,10 @@ // @Override // public void onResponse(Call call, Response response) { // if (response.isSuccessful()){ -// -// if(response.body().equals(timerPreData)){ +// if(timerPreData == null){ +// timerMutableLiveData.setValue(response.body()); +// timerPreData = response.body(); +// }else if(response.body().equals(timerPreData)){ // //値が一緒なら書き換えない // }else{ // //値が異なるときのみライブデータを上書き