feature: save location
This commit is contained in:
@@ -136,6 +136,17 @@ namespace Billing
|
||||
}
|
||||
|
||||
public delegate void PropertyValueChanged<TResult, TOwner>(TOwner obj, TResult old, TResult @new);
|
||||
|
||||
public static async Task<PermissionStatus> CheckAndRequestPermissionAsync<T>() where T : Permissions.BasePermission, new()
|
||||
{
|
||||
var status = await Permissions.CheckStatusAsync<T>();
|
||||
if (status != PermissionStatus.Disabled &&
|
||||
status != PermissionStatus.Granted)
|
||||
{
|
||||
status = await Permissions.RequestAsync<T>();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
public class AsyncLazy<T>
|
||||
|
||||
Reference in New Issue
Block a user