mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-17 18:16:28 +03:00
minor changes in RecentFilesService.cs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using KeyKeeper.Models;
|
||||
|
||||
@@ -7,13 +8,20 @@ namespace KeyKeeper.Services;
|
||||
|
||||
internal class RecentFilesService : IRecentFilesService
|
||||
{
|
||||
private const string RecentFilesFilename = "recent-files.json";
|
||||
|
||||
// files are stored in reverse chronological order
|
||||
public ObservableCollection<RecentFile> RecentFiles { get; }
|
||||
private readonly int maxEntries = 8;
|
||||
private readonly string recentFilesPath;
|
||||
|
||||
public RecentFilesService()
|
||||
{
|
||||
RecentFiles = new ObservableCollection<RecentFile>();
|
||||
var appDataDirectory = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"KeyKeeper");
|
||||
recentFilesPath = Path.Combine(appDataDirectory, RecentFilesFilename);
|
||||
}
|
||||
|
||||
public void Remember(string filename)
|
||||
|
||||
Reference in New Issue
Block a user