allow to read status after every command

This commit is contained in:
Milos Kozak 2017-12-20 20:45:21 +01:00
parent c33dd1e7d7
commit 63b0efede3

View file

@ -326,14 +326,14 @@ public class CommandQueue {
// returns true if command is queued
public boolean readStatus(String reason, Callback callback) {
if (isRunning(Command.CommandType.READSTATUS)) {
if (callback != null)
callback.result(executingNowError()).run();
return false;
}
//if (isRunning(Command.CommandType.READSTATUS)) {
// if (callback != null)
// callback.result(executingNowError()).run();
// return false;
//}
// remove all unfinished
removeAll(Command.CommandType.READSTATUS);
//removeAll(Command.CommandType.READSTATUS);
// add new command to queue
add(new CommandReadStatus(reason, callback));