mirror of
https://github.com/moparisthebest/mail
synced 2024-12-24 00:08:48 -05:00
Use local () instead of () in certain cases for performance
This commit is contained in:
parent
bb386299b9
commit
2eff335680
@ -44,7 +44,7 @@ define(function(require) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// display fetched body
|
// display fetched body
|
||||||
$scope.$apply();
|
$scope.$digest();
|
||||||
|
|
||||||
// automatically decrypt if it's the selected email
|
// automatically decrypt if it's the selected email
|
||||||
if (email === $scope.state.mailList.selected) {
|
if (email === $scope.state.mailList.selected) {
|
||||||
@ -209,7 +209,6 @@ define(function(require) {
|
|||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
// display and select first
|
// display and select first
|
||||||
selectFirstMessage();
|
selectFirstMessage();
|
||||||
$scope.$apply();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.synchronize();
|
$scope.synchronize();
|
||||||
@ -455,7 +454,6 @@ define(function(require) {
|
|||||||
scope.$watchCollection(model, function() {
|
scope.$watchCollection(model, function() {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
myScroll.refresh();
|
myScroll.refresh();
|
||||||
scope.$apply();
|
|
||||||
});
|
});
|
||||||
// load the visible message bodies, when the list is re-initialized and when scrolling stopped
|
// load the visible message bodies, when the list is re-initialized and when scrolling stopped
|
||||||
scope.loadVisibleBodies();
|
scope.loadVisibleBodies();
|
||||||
|
@ -174,7 +174,7 @@ define(function(require) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.checkSendStatus();
|
$scope.checkSendStatus();
|
||||||
$scope.$apply();
|
$scope.$digest();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -334,10 +334,9 @@ define(function(require) {
|
|||||||
link: function(scope, elm, attrs, ctrl) {
|
link: function(scope, elm, attrs, ctrl) {
|
||||||
// view -> model
|
// view -> model
|
||||||
elm.on('keyup keydown', function() {
|
elm.on('keyup keydown', function() {
|
||||||
scope.$apply(function() {
|
// set model
|
||||||
// set model
|
ctrl.$setViewValue(elm[0].innerText);
|
||||||
ctrl.$setViewValue(elm[0].innerText);
|
scope.$digest();
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// model -> view
|
// model -> view
|
||||||
@ -481,7 +480,7 @@ define(function(require) {
|
|||||||
element.on('keydown', function(e) {
|
element.on('keydown', function(e) {
|
||||||
var code = e.keyCode;
|
var code = e.keyCode;
|
||||||
|
|
||||||
scope.$apply();
|
scope.$digest();
|
||||||
|
|
||||||
if (code === 32 || code === 188 || code === 186) {
|
if (code === 32 || code === 188 || code === 186) {
|
||||||
// catch space, comma, semicolon
|
// catch space, comma, semicolon
|
||||||
@ -523,7 +522,7 @@ define(function(require) {
|
|||||||
mimeType: file.type,
|
mimeType: file.type,
|
||||||
content: new Uint8Array(e.target.result)
|
content: new Uint8Array(e.target.result)
|
||||||
});
|
});
|
||||||
scope.$apply();
|
scope.$digest();
|
||||||
};
|
};
|
||||||
reader.readAsArrayBuffer(file);
|
reader.readAsArrayBuffer(file);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user