Skip to content

Commit b66b5b3

Browse files
committed
Updating IAccount.Passwords type
1 parent e83ead5 commit b66b5b3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Core/Interfaces/IAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface IAccount : IItem
3535
/// <summary>
3636
/// The passwords history.
3737
/// </summary>
38-
Dictionary<long, string> Passwords { get; }
38+
Dictionary<DateTime, string> Passwords { get; }
3939

4040
/// <summary>
4141
/// The number of month before a password update remind.

Core/Models/Account.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public string Password
3030
{
3131
if (!string.IsNullOrEmpty(value))
3232
{
33-
Passwords[DateTime.Now.Ticks] = value;
33+
Passwords[DateTime.Now] = value;
3434

3535
if (_service != null)
3636
{
@@ -40,7 +40,7 @@ public string Password
4040
}
4141
}
4242

43-
Dictionary<long, string> IAccount.Passwords => new(Passwords);
43+
Dictionary<DateTime, string> IAccount.Passwords => new(Passwords);
4444

4545
string IAccount.Notes
4646
{
@@ -75,7 +75,7 @@ internal Service Service
7575

7676
public string Label { get; set; } = string.Empty;
7777
public string[] Identifiants { get; set; } = [];
78-
public Dictionary<long, string> Passwords { get; set; } = [];
78+
public Dictionary<DateTime, string> Passwords { get; set; } = [];
7979
public string Notes { get; set; } = string.Empty;
8080
public int PasswordUpdateReminderDelay { get; set; } = 0;
8181
public AccountOption Options { get; set; } = AccountOption.None;
@@ -97,7 +97,7 @@ public void Apply(Change change)
9797
Notes = Database.SerializationCenter.Deserialize<string>(change.Value);
9898
break;
9999
case nameof(Passwords):
100-
Passwords = Database.SerializationCenter.Deserialize<Dictionary<long, string>>(change.Value);
100+
Passwords = Database.SerializationCenter.Deserialize<Dictionary<DateTime, string>>(change.Value);
101101
break;
102102
case nameof(PasswordUpdateReminderDelay):
103103
PasswordUpdateReminderDelay = Database.SerializationCenter.Deserialize<int>(change.Value);

0 commit comments

Comments
 (0)