refactor: Replace deprecated methods
This commit is contained in:
@@ -149,7 +149,7 @@ typedef NS_ENUM(NSInteger, AllerteTableRow) {
|
||||
[self.tableItems addObject:@(AllerteTableRowReteSmartphone)];
|
||||
}
|
||||
// check if locations is enabled
|
||||
if (CLLocationManager.authorizationStatus != kCLAuthorizationStatusAuthorizedAlways) {
|
||||
if (EQNUserData.sharedData.locationAuthorizationStatus != kCLAuthorizationStatusAuthorizedAlways) {
|
||||
[self.tableItems addObject:@(AllerteTableRowLocationPermission)];
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ typedef NS_ENUM(NSInteger, AllerteTableRow) {
|
||||
|
||||
- (void)actionTestPush
|
||||
{
|
||||
CLAuthorizationStatus status = CLLocationManager.authorizationStatus;
|
||||
CLAuthorizationStatus status = EQNUserData.sharedData.locationAuthorizationStatus;
|
||||
if (status != kCLAuthorizationStatusAuthorizedAlways && status != kCLAuthorizationStatusAuthorizedWhenInUse) {
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"attention", nil)
|
||||
message:NSLocalizedString(@"liveview_unknown_location", nil)
|
||||
@@ -273,7 +273,7 @@ typedef NS_ENUM(NSInteger, AllerteTableRow) {
|
||||
if (tableRow == AllerteTableRowLocationPermission) {
|
||||
AlertsNoLocationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NoLocationCell" forIndexPath:indexPath];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[cell updateWith:CLLocationManager.authorizationStatus];
|
||||
[cell updateWith:EQNUserData.sharedData.locationAuthorizationStatus];
|
||||
return cell;
|
||||
|
||||
} else if (tableRow == AllerteTableRowSismiRilevati) {
|
||||
|
||||
@@ -23,6 +23,13 @@ import CoreLocation
|
||||
return !firstAppStartExecuted
|
||||
}
|
||||
|
||||
// MARK: - Permissions
|
||||
|
||||
@objc
|
||||
var locationAuthorizationStatus: CLAuthorizationStatus {
|
||||
CLLocationManager().authorizationStatus
|
||||
}
|
||||
|
||||
// MARK: - Firebase Token
|
||||
|
||||
@objc
|
||||
|
||||
Reference in New Issue
Block a user