modify method name
This commit is contained in:
parent
5c6cee7b42
commit
dd24ea052b
|
@ -198,11 +198,11 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
aria2TaskService.onConnectSuccess(function () {
|
aria2TaskService.onOperationSuccess(function () {
|
||||||
$rootScope.taskContext.rpcStatus = 'Connected';
|
$rootScope.taskContext.rpcStatus = 'Connected';
|
||||||
});
|
});
|
||||||
|
|
||||||
aria2TaskService.onConnectError(function () {
|
aria2TaskService.onOperationError(function () {
|
||||||
$rootScope.taskContext.rpcStatus = 'Disconnected';
|
$rootScope.taskContext.rpcStatus = 'Disconnected';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
var secret = ariaNgSettingService.getCurrentRpcSecret();
|
var secret = ariaNgSettingService.getCurrentRpcSecret();
|
||||||
|
|
||||||
var onFirstSuccessCallbacks = [];
|
var onFirstSuccessCallbacks = [];
|
||||||
var onConnectSuccessCallbacks = [];
|
var onOperationSuccessCallbacks = [];
|
||||||
var onConnectErrorCallbacks = [];
|
var onOperationErrorCallbacks = [];
|
||||||
var onDownloadStartCallbacks = [];
|
var onDownloadStartCallbacks = [];
|
||||||
var onDownloadPauseCallbacks = [];
|
var onDownloadPauseCallbacks = [];
|
||||||
var onDownloadStopCallbacks = [];
|
var onDownloadStopCallbacks = [];
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fireCustomEvent(onConnectSuccessCallbacks);
|
fireCustomEvent(onOperationSuccessCallbacks);
|
||||||
|
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
isConnected = true;
|
isConnected = true;
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fireCustomEvent(onConnectErrorCallbacks);
|
fireCustomEvent(onOperationErrorCallbacks);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,11 +471,11 @@
|
||||||
onFirstSuccess: function (context) {
|
onFirstSuccess: function (context) {
|
||||||
onFirstSuccessCallbacks.push(context.callback);
|
onFirstSuccessCallbacks.push(context.callback);
|
||||||
},
|
},
|
||||||
onConnectSuccess: function (context) {
|
onOperationSuccess: function (context) {
|
||||||
onConnectSuccessCallbacks.push(context.callback);
|
onOperationSuccessCallbacks.push(context.callback);
|
||||||
},
|
},
|
||||||
onConnectError: function (context) {
|
onOperationError: function (context) {
|
||||||
onConnectErrorCallbacks.push(context.callback);
|
onOperationErrorCallbacks.push(context.callback);
|
||||||
},
|
},
|
||||||
onDownloadStart: function (context) {
|
onDownloadStart: function (context) {
|
||||||
onDownloadStartCallbacks.push(context.callback);
|
onDownloadStartCallbacks.push(context.callback);
|
||||||
|
|
|
@ -797,23 +797,23 @@
|
||||||
callback: callback
|
callback: callback
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onConnectSuccess: function (callback) {
|
onOperationSuccess: function (callback) {
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
ariaNgLogService.warn('[aria2TaskService.onConnectSuccess] callback is null');
|
ariaNgLogService.warn('[aria2TaskService.onOperationSuccess] callback is null');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
aria2RpcService.onConnectSuccess({
|
aria2RpcService.onOperationSuccess({
|
||||||
callback: callback
|
callback: callback
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onConnectError: function (callback) {
|
onOperationError: function (callback) {
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
ariaNgLogService.warn('[aria2TaskService.onConnectError] callback is null');
|
ariaNgLogService.warn('[aria2TaskService.onOperationError] callback is null');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
aria2RpcService.onConnectError({
|
aria2RpcService.onOperationError({
|
||||||
callback: callback
|
callback: callback
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue