Фикс шатдауна при вотекике
This commit is contained in:
parent
0960067e4e
commit
a4647c5c0c
2 changed files with 17 additions and 2 deletions
|
|
@ -319,12 +319,17 @@ public sealed class PlayTimeTrackingManager : ISharedPlaytimeManager, IPostInjec
|
||||||
|
|
||||||
public async Task LoadData(ICommonSession session, CancellationToken cancel)
|
public async Task LoadData(ICommonSession session, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
var data = new PlayTimeData();
|
// Sunrise-Edit
|
||||||
_playTimeData[session.UserId] = data; // Sunrise-Edit
|
if (!_playTimeData.TryGetValue(session.UserId, out var data))
|
||||||
|
{
|
||||||
|
data = new PlayTimeData();
|
||||||
|
_playTimeData[session.UserId] = data;
|
||||||
|
}
|
||||||
|
|
||||||
var playTimes = await _db.GetPlayTimes(session.UserId, cancel);
|
var playTimes = await _db.GetPlayTimes(session.UserId, cancel);
|
||||||
cancel.ThrowIfCancellationRequested();
|
cancel.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
|
data.TrackerTimes.Clear(); // Sunrise-Edit
|
||||||
foreach (var timer in playTimes)
|
foreach (var timer in playTimes)
|
||||||
{
|
{
|
||||||
data.TrackerTimes.Add(timer.Tracker, timer.TimeSpent);
|
data.TrackerTimes.Add(timer.Tracker, timer.TimeSpent);
|
||||||
|
|
|
||||||
|
|
@ -13830,3 +13830,13 @@
|
||||||
type: Tweak
|
type: Tweak
|
||||||
id: 947
|
id: 947
|
||||||
time: '2025-03-29T18:56:04.201277+00:00'
|
time: '2025-03-29T18:56:04.201277+00:00'
|
||||||
|
- author: VigersRay
|
||||||
|
changes:
|
||||||
|
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0432\u044B\u043B\
|
||||||
|
\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u043E \u0432\u0440\
|
||||||
|
\u0435\u043C\u044F \u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u043D\u0438\
|
||||||
|
\u044F \u0437\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F\
|
||||||
|
\ (\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E)."
|
||||||
|
type: Fix
|
||||||
|
id: 948
|
||||||
|
time: '2025-04-02T18:48:17.976246+00:00'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue