Beispiel #1
0
        public void Reload()
        {
            if (IsLoading)
            {
                return;
            }

            startFrom = Time.UtcNow;
            DateGroups.Clear();
            HasMore = true;

            var syncManager = ServiceContainer.Resolve <ISyncManager> ();

            if (syncManager.IsRunning)
            {
                // Fake loading until initial sync has finished
                IsLoading = true;

                reloadScheduled = true;
                if (subscriptionSyncFinished == null)
                {
                    var bus = ServiceContainer.Resolve <MessageBus> ();
                    subscriptionSyncFinished = bus.Subscribe <SyncFinishedMessage> (OnSyncFinished);
                }
            }
            else
            {
                Load(true);
            }
        }
Beispiel #2
0
        public async Task ReloadAsync()
        {
            if (IsLoading)
            {
                return;
            }

            // Temporal hack to be sure that
            // collection is initialised.
            isInitialised = true;

            startFrom = Time.UtcNow;
            DateGroups.Clear();
            HasMore = true;

            await LoadAsync(true);
        }