Added counters of unread messages for additional accounts (#377)

This commit is contained in:
RainLoop Team 2015-02-02 00:46:23 +04:00
parent abddb3d828
commit 79233ad83c
19 changed files with 333 additions and 93 deletions

View file

@ -29,18 +29,14 @@
{
AbstractView.call(this, 'Right', 'SystemDropDown');
this.accounts = AccountStore.collection;
this.accountEmail = Data.accountEmail;
this.accountsLoading = AccountStore.loading;
this.accounts = AccountStore.accounts;
this.accountsUnreadCount = AccountStore.accountsUnreadCount;
this.accountMenuDropdownTrigger = ko.observable(false);
this.capaAdditionalAccounts = ko.observable(Settings.capa(Enums.Capa.AdditionalAccounts));
this.loading = ko.computed(function () {
return this.accountsLoading();
}, this);
this.accountClick = _.bind(this.accountClick, this);
}
@ -50,10 +46,10 @@
{
if (oAccount && oEvent && !Utils.isUnd(oEvent.which) && 1 === oEvent.which)
{
var self = this;
this.accountsLoading(true);
AccountStore.accounts.loading(true);
_.delay(function () {
self.accountsLoading(false);
AccountStore.accounts.loading(false);
}, 1000);
}