Пример #1
0
        /// <summary>
        /// Sets all shares for the specified store.
        /// </summary>
        public void SetSharesForStore(GABUser store, ICollection <SharedFolder> shares, CancellationToken?cancel)
        {
            // Make sure reminders are updated as soon as possible
            UpdateReminders(shares);
            _api.SetCurrentShares(store, shares, cancel);

            // Commit changes
            if (_query != null)
            {
                _query.Commit();
            }
        }
Пример #2
0
        public void UpdateSharedStore()
        {
            Logger.Instance.Debug(this, "Updating shared store: {0}", _account);
            RemindersQuery query = OpenQuery();

            if (query != null)
            {
                Logger.Instance.Debug(this, "Updating shared store reminders: {0}", query);
                ((RemindersQueryStore)query).SetReminders(_account.ShowReminders);
                query.Commit();
            }
        }
Пример #3
0
        /// <summary>
        /// Sets all shares for the specified store.
        /// </summary>
        public void SetSharesForStore(GABUser store, ICollection <SharedFolder> shares, CancellationToken?cancel)
        {
            // Make sure reminders are updated as soon as possible
            UpdateReminders(shares);

            // Store the send-as addresses
            foreach (SharedFolder share in shares)
            {
                if (share.CanSendAs)
                {
                    _account.SetSendAsAddress(share.BackendId, share.FlagSendAsOwner ? share.SendAsAddress : null);
                }
            }

            // Update the shares
            _api.SetCurrentShares(store, shares, cancel);

            // Commit changes
            if (_query != null)
            {
                _query.Commit();
            }
        }