stop showing live location disclaimer when accepted.

This commit is contained in:
Mauro Romito
2026-04-22 17:03:10 +02:00
committed by Mauro
parent f23b77a481
commit 6dc6eed9e3
6 changed files with 47 additions and 14 deletions
@@ -58,6 +58,15 @@ class LiveLocationManager: NSObject, LiveLocationManagerProtocol, CLLocationMana
// MARK: - LiveLocationManagerProtocol
var hasDisplayedLiveLocationDisclaimer: Bool {
get {
appSettings.liveLocationDisclaimerDisplayed
}
set {
appSettings.liveLocationDisclaimerDisplayed = newValue
}
}
@discardableResult
func requestAlwaysAuthorizationIfPossible() -> Bool {
guard !appSettings.hasRequestedLocationAlwaysLocationAuthorization else { return false }
@@ -16,6 +16,8 @@ enum LiveLocationManagerError: Error {
// sourcery: AutoMockable
protocol LiveLocationManagerProtocol: AnyObject {
/// True if the live location disclaimer has been displayed already, will only be displayed once.
var hasDisplayedLiveLocationDisclaimer: Bool { get set }
/// Publishes the current location authorization status.
var authorizationStatus: CurrentValuePublisher<CLAuthorizationStatus, Never> { get }