Commit c88f7b70 authored by Timo Tegtmeier's avatar Timo Tegtmeier

Minor refactoring

parent ab754a5b
......@@ -89,22 +89,6 @@ enyo.kind({
}
},
/** @private
*
* Tell the system, that we enter a phase of activity.
*/
enterActivity: function(duration) {
enyo.Signals.send("onSpoolerBeginActivity")
},
/** @private
*
* Tell the system, that we left our activity phase.
*/
leaveActivity: function() {
enyo.Signals.send("onSpoolerEndActivity");
},
/**
* Called to indicate a spooled action has finished. The next spooled
* activity will be started if any.
......@@ -112,22 +96,24 @@ enyo.kind({
nextAction: function() {
try {
if(this.list.length >= 1) {
if(!this.actionRunning) {
enyo.Signals.send("onSpoolerRunningChanged", { state: true });
}
if(!this.actionRunning) {
enyo.Signals.send("onSpoolerRunningChanged", { state: true });
}
var action = this.list.shift();
this.actionRunning = true;
this.actionIdent = action.ident;
this.enterActivity();
enyo.Signals.send("onSpoolerBeginActivity");
action.execute();
} else {
if(this.actionRunning) {
enyo.Signals.send("onSpoolerRunningChanged", { state: false });
}
if(this.actionRunning) {
enyo.asyncMethod(this, function() {
enyo.Signals.send("onSpoolerRunningChanged", { state: false });
});
}
this.actionRunning = false;
this.actionIdent = "";
enyo.application.feeds.interactiveUpdate = false;
this.leaveActivity();
enyo.Signals.send("onSpoolerEndActivity");
}
} catch(e) {
this.error(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment