mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-01 03:22:43 +00:00
(fix #154) show toast upon subscribtion - strings will be added in separate commit
This commit is contained in:
@@ -297,8 +297,12 @@
|
||||
*/
|
||||
function subscribeToFolder(addressbookData) {
|
||||
console.debug('subscribeToFolder ' + addressbookData.owner + addressbookData.name);
|
||||
AddressBook.$subscribe(addressbookData.owner, addressbookData.name).catch(function(data) {
|
||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
||||
AddressBook.$subscribe(addressbookData.owner, addressbookData.name).then(function(data) {
|
||||
$mdToast.show(
|
||||
$mdToast.simple()
|
||||
.content(l('Sucessfully subscribed to address book'))
|
||||
.position('top right')
|
||||
.hideDelay(3000));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,8 +313,12 @@
|
||||
// Callback of sgSubscribe directive
|
||||
function subscribeToFolder(calendarData) {
|
||||
$log.debug('subscribeToFolder ' + calendarData.owner + calendarData.name);
|
||||
Calendar.$subscribe(calendarData.owner, calendarData.name).catch(function(data) {
|
||||
Dialog.alert(l('Warning'), l('An error occured please try again.'));
|
||||
Calendar.$subscribe(calendarData.owner, calendarData.name).then(function(data) {
|
||||
$mdToast.show(
|
||||
$mdToast.simple()
|
||||
.content(l('Sucessfully subscribed to calendar'))
|
||||
.position('top right')
|
||||
.hideDelay(3000));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user