Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose live location sharing labs flag (default: false) and re-enable background location access (PSF-1127) #6324

Merged
merged 4 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Config/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ final class BuildSettings: NSObject {
guard self.locationSharingEnabled else {
return false
}

// Do not enable live location sharing atm
return false

ismailgulek marked this conversation as resolved.
Show resolved Hide resolved
return true
}
}
2 changes: 1 addition & 1 deletion Riot/Managers/Settings/RiotSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ final class RiotSettings: NSObject {
var enableUISIAutoReporting

/// Indicates if live location sharing is enabled
@UserDefault(key: UserDefaultsKeys.enableLiveLocationSharing, defaultValue: BuildSettings.liveLocationSharingEnabled, storage: defaults)
@UserDefault(key: UserDefaultsKeys.enableLiveLocationSharing, defaultValue: false, storage: defaults)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this should still use a BuildSettings value

var enableLiveLocationSharing

// MARK: Calls
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/LocationSharing/UserLocationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class UserLocationService: UserLocationServiceProtocol {
// MARK: - Setup

init(session: MXSession) {
self.locationManager = LocationManager(accuracy: .full, allowsBackgroundLocationUpdates: false)
self.locationManager = LocationManager(accuracy: .full, allowsBackgroundLocationUpdates: true)
ismailgulek marked this conversation as resolved.
Show resolved Hide resolved
self.session = session
}

Expand Down
1 change: 0 additions & 1 deletion Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ - (void)updateSections
[sectionLabs addRowWithTag:LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS];
if (BuildSettings.liveLocationSharingEnabled)
{
// Hide live location lab setting until it's ready to be release
[sectionLabs addRowWithTag:LABS_ENABLE_LIVE_LOCATION_SHARING];
}
sectionLabs.headerTitle = [VectorL10n settingsLabs];
Expand Down
1 change: 1 addition & 0 deletions Riot/SupportingFiles/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>location</string>
<string>remote-notification</string>
<string>voip</string>
</array>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct LocationSharingViewState: BindableState {
/// True to indicate to show and follow current user location
var showsUserLocation: Bool = false

/// Used to hide live location sharing features until is finished
/// Used to hide live location sharing features
var isLiveLocationSharingEnabled: Bool = false

var shareButtonEnabled: Bool {
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-6324.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Expose live location sharing labs flag (default: false) and re-enable background location access