feat(DataCollection) Added opt-in data collection

This commit is contained in:
2022-04-25 12:43:23 -04:00
parent 5e9ed4c2f5
commit 43d7391df2
79 changed files with 798 additions and 283 deletions
+8 -6
View File
@@ -2,7 +2,7 @@
namespace Services.Website;
public class PermissionService : IPermissionService
public class PermissionService : IPermissionService, IDisposable
{
private IJSRuntime _jsRuntime;
private readonly IStorageService _storageService;
@@ -15,6 +15,13 @@ public class PermissionService : IPermissionService
_jsRuntime = jsRuntime;
_toastService = toastService;
_storageService = storageService;
_storageService.Subscribe(NotifyDataChanged);
}
void IDisposable.Dispose()
{
_storageService.Unsubscribe(NotifyDataChanged);
}
public void Subscribe(Action action)
@@ -47,11 +54,6 @@ public class PermissionService : IPermissionService
_storageService.SetValue(StorageKeys.EnabledDataCollection, isEnabled);
}
public Task Load()
{
throw new NotImplementedException();
}
private event Action OnChange = null!;
private void NotifyDataChanged()