(js) Fix links to newly subscribed calendar

This commit is contained in:
Francis Lachapelle
2016-11-08 11:44:10 -05:00
parent de9e3ed0b3
commit 8e33794400
@@ -104,11 +104,10 @@
this.$Preferences.ready().then(function() {
if (Calendar.$Preferences.settings.Calendar.FoldersOrder)
// Save list order
Calendar.saveFoldersOrder(_.flatMap(Calendar.$findAll(), 'id')).then(function() {
// Refresh list of calendars to fetch links associated to new calendar
Calendar.$reloadAll();
});
Calendar.saveFoldersOrder(_.flatMap(Calendar.$findAll(), 'id'));
});
// Refresh list of calendars to fetch links associated to new calendar
Calendar.$reloadAll();
};
/**
@@ -166,7 +165,7 @@
if (calendarData.isWebCalendar)
group = _this.$webcalendars;
else if (calendarData.isSubscription)
else if (calendarData.owner != Calendar.activeUser.login)
group = _this.$subscriptions;
else
group = _this.$calendars;