Skip to content

Commit 4af2274

Browse files
hez2010hishitetsu
andauthored
Code Quality: Use registry for preferences and tags storage (#15220)
Co-authored-by: hishitetsu <[email protected]>
1 parent 10b0690 commit 4af2274

17 files changed

+709
-187
lines changed

src/Files.App (Package)/Package.appxmanifest

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168
<ActivatableClass ActivatableClassId="Files.App.Server.AppInstanceMonitor" />
169169
<ActivatableClass ActivatableClassId="Files.App.Server.Database.FileTagsDatabase" />
170170
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesDatabase" />
171-
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesUpdateAction" />
172171
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferences" />
173172
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferencesItem" />
174173
<ActivatableClass ActivatableClassId="Files.App.Server.Data.TaggedFile" />

src/Files.App.Server/Data/LayoutPreferences.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// Copyright (c) 2024 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using LiteDB;
4+
using Files.Shared;
55

66
namespace Files.App.Server.Data
77
{
8+
[RegistrySerializable]
89
public sealed class LayoutPreferences
910
{
10-
[BsonId]
11-
public int Id { get; set; }
1211
public ulong? Frn { get; set; }
1312
public string FilePath { get; set; } = string.Empty;
1413

src/Files.App.Server/Data/TaggedFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Copyright (c) 2024 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using LiteDB;
4+
using Files.Shared;
55

66
namespace Files.App.Server.Data
77
{
8+
[RegistrySerializable]
89
public sealed class TaggedFile
910
{
10-
[BsonId] public int Id { get; set; }
1111
public ulong? Frn { get; set; }
1212
public string FilePath { get; set; } = string.Empty;
1313
public string[] Tags { get; set; } = [];

0 commit comments

Comments
 (0)