Update mark unmark model immediately in remote mode
This commit is contained in:
parent
4a2f7c2d27
commit
87f7bd6e83
|
@ -706,17 +706,21 @@ public class RemoteRecorder implements Recorder {
|
|||
|
||||
@Override
|
||||
public void markForLaterRecording(Model model, boolean mark) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
|
||||
model.setMarkedForLaterRecording(mark);
|
||||
LOG.info("Marking model {} {}", model, mark);
|
||||
if (mark) {
|
||||
sendRequest("markForLater", model);
|
||||
} else {
|
||||
sendRequest("unmarkForLater", model);
|
||||
}
|
||||
model.setMarkedForLaterRecording(mark);
|
||||
// update cached model
|
||||
// update locally cached model
|
||||
int index = models.indexOf(model);
|
||||
if (index >= 0) {
|
||||
Model m = models.get(index);
|
||||
m.setSuspended(mark);
|
||||
m.setMarkedForLaterRecording(mark);
|
||||
models.remove(index);
|
||||
} else {
|
||||
models.add(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue