snappymail/dev/Stores/User/Identity.jsx
2016-04-20 20:31:24 +03:00

18 lines
395 B
JavaScript

import {_} from 'common';
import ko from 'ko';
class IdentityUserStore
{
constructor()
{
this.identities = ko.observableArray([]);
this.identities.loading = ko.observable(false).extend({throttle: 100});
this.identitiesIDS = ko.computed(() => {
return _.compact(_.map(this.identities(), (item) => item ? item.id : null));
}, this);
}
}
module.exports = new IdentityUserStore();