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 // returns true if command is queued
public boolean readStatus(String reason, Callback callback) { public boolean readStatus(String reason, Callback callback) {
if (isRunning(Command.CommandType.READSTATUS)) { //if (isRunning(Command.CommandType.READSTATUS)) {
if (callback != null) // if (callback != null)
callback.result(executingNowError()).run(); // callback.result(executingNowError()).run();
return false; // return false;
} //}
// remove all unfinished // remove all unfinished
removeAll(Command.CommandType.READSTATUS); //removeAll(Command.CommandType.READSTATUS);
// add new command to queue // add new command to queue
add(new CommandReadStatus(reason, callback)); add(new CommandReadStatus(reason, callback));