Ejemplo n.º 1
0
        /// <summary>
        /// Updates the status bar with info about how fresh the search results are
        /// </summary>
        private async Task UpdateFreshnessInfoAsync(SearchLocation location)
        {
            var scanAges = await _db.GetScanAgesAsync(location.Path);

            if (scanAges.Any())
            {
                var oldest = scanAges.Max(item => item.Value);
                tslStatus.Text = $"Last scanned {oldest.Humanize()} ago";
            }
            else
            {
                tslStatus.Text = "Not scanned before";
            }
        }