feat(DataCollection) Added opt-in data collection
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user