Skip to content

Commit 564cad1

Browse files
mpaganimpagani
authored andcommitted
fix: Rename UserActivityTracker instance variable
Updated the private static readonly instance of the `UserActivityTracker` class from `_instance` to `s_instance`. This change enhances code readability by using the `s_` prefix to indicate that the variable is static.
1 parent e3bb8d2 commit 564cad1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Models/UserActivityTracker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace SourceGit.Models
55
{
66
public class UserActivityTracker
77
{
8-
private static readonly Lazy<UserActivityTracker> _instance = new(() => new UserActivityTracker());
8+
private static readonly Lazy<UserActivityTracker> s_instance = new(() => new UserActivityTracker());
99
private bool _isWindowActive = false;
1010
private DateTime _lastActivity = DateTime.MinValue;
1111
private readonly Lock _lockObject = new();
@@ -75,6 +75,6 @@ public void UpdateLastActivity()
7575
_lastActivity = DateTime.Now;
7676
}
7777

78-
public static UserActivityTracker Instance => _instance.Value;
78+
public static UserActivityTracker Instance => s_instance.Value;
7979
}
8080
}

0 commit comments

Comments
 (0)