mail: make virtual "All Mail" togglable
Mac clients behave poorly when this virtual mailbox is present
This commit is contained in:
@@ -133,6 +133,41 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
}
|
||||
};
|
||||
|
||||
$scope.virtualAllMail = {
|
||||
busy: false,
|
||||
error: null,
|
||||
enabled: false,
|
||||
|
||||
refresh: function () {
|
||||
Client.getVirtualAllMail(function (error, enabled) {
|
||||
if (error) return console.error('Failed to get max email size', error);
|
||||
|
||||
$scope.virtualAllMail.enabled = enabled;
|
||||
});
|
||||
},
|
||||
|
||||
show: function() {
|
||||
$scope.virtualAllMail.busy = false;
|
||||
$scope.virtualAllMail.error = null;
|
||||
|
||||
$('#virtualAllMailChangeModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function (enable) {
|
||||
$scope.virtualAllMail.busy = true;
|
||||
|
||||
Client.setVirtualAllMail(enable, function (error) {
|
||||
$scope.virtualAllMail.busy = false;
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.virtualAllMail.enabled = enable;
|
||||
|
||||
$('#virtualAllMailChangeModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.mailboxSharing = {
|
||||
busy: false,
|
||||
error: null,
|
||||
@@ -422,6 +457,7 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
if ($scope.user.isAtLeastOwner) {
|
||||
$scope.mailLocation.refresh();
|
||||
$scope.maxEmailSize.refresh();
|
||||
$scope.virtualAllMail.refresh();
|
||||
$scope.mailboxSharing.refresh();
|
||||
$scope.spamConfig.refresh();
|
||||
$scope.solrConfig.refresh();
|
||||
|
||||
Reference in New Issue
Block a user