sync: refactor sync device service to be more memory efficient

This commit is contained in:
Abdullah Atta
2024-06-07 10:55:15 +05:00
parent 7ce02d0193
commit 0c0ade0c64
4 changed files with 127 additions and 73 deletions

View File

@@ -172,7 +172,7 @@ namespace Notesnook.API.Services
{
await Slogger<UserService>.Info(nameof(DeleteUserAsync), "Deleting user account", userId);
SyncDeviceService.ResetDevices(userId);
new SyncDeviceService(new SyncDevice(ref userId, ref userId)).ResetDevices();
var cc = new CancellationTokenSource();
@@ -228,7 +228,7 @@ namespace Notesnook.API.Services
public async Task<bool> ResetUserAsync(string userId, bool removeAttachments)
{
SyncDeviceService.ResetDevices(userId);
new SyncDeviceService(new SyncDevice(ref userId, ref userId)).ResetDevices();
var cc = new CancellationTokenSource();