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