1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-24 00:08:48 -05:00

fix dummymails in chrome

This commit is contained in:
Tankred Hase 2013-09-12 00:04:36 +02:00
parent 4280de30c8
commit badfd6f87b

View File

@ -18,30 +18,30 @@ define(function(require) {
var replyToId = (replyTo) ? replyTo.uid : '', var replyToId = (replyTo) ? replyTo.uid : '',
url = 'index.html#/write/' + replyToId; url = 'index.html#/write/' + replyToId;
if (!window.chrome) { if (window.chrome && chrome.app.window) {
window.open(url, 'Compose Message', 'toolbar=no,width=800,height=600,left=500,top=200,status=no,scrollbars=no,resize=no'); chrome.app.window.create(url, {
'bounds': {
'width': 800,
'height': 600
}
});
return; return;
} }
chrome.app.window.create(url, { window.open(url, 'Compose Message', 'toolbar=no,width=800,height=600,left=500,top=200,status=no,scrollbars=no,resize=no');
'bounds': {
'width': 800,
'height': 600
}
});
}; };
if (!window.chrome) { if (window.chrome && window.chrome.identity) {
createDummyMails(function(emails) { fetchList(function(emails) {
$scope.emails = emails; $scope.emails = emails;
$scope.select($scope.emails[0]); $scope.$apply();
}); });
return; return;
} }
fetchList(function(emails) { createDummyMails(function(emails) {
$scope.emails = emails; $scope.emails = emails;
$scope.$apply(); $scope.select($scope.emails[0]);
}); });
}; };