allow to read status after every command
This commit is contained in:
parent
c33dd1e7d7
commit
63b0efede3
1 changed files with 6 additions and 6 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue