mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
MESSENGER-4549 Enable locationsharing per default when there is an url in well-known
This commit is contained in:
@@ -2445,7 +2445,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
[self.delegate roomViewControllerDidRequestPollCreationFormPresentation:self];
|
||||
}]];
|
||||
}
|
||||
if (BWIBuildSettings.shared.locationSharingEnabled && !self.isNewDirectChat)
|
||||
if ( [self bwiShowLocationSharingUI:self.roomDataSource.mxSession] && !self.isNewDirectChat)
|
||||
{
|
||||
[actionItems addObject:[[RoomActionItem alloc] initWithImage:AssetImages.actionLocation.image andAction:^{
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
@@ -5299,7 +5299,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
{
|
||||
[actionItems addObject:@(ComposerCreateActionPolls)];
|
||||
}
|
||||
if (BWIBuildSettings.shared.locationSharingEnabled && !self.isNewDirectChat)
|
||||
if ([self bwiShowLocationSharingUI:self.roomDataSource.mxSession] && !self.isNewDirectChat)
|
||||
{
|
||||
[actionItems addObject:@(ComposerCreateActionLocation)];
|
||||
}
|
||||
@@ -8234,6 +8234,17 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
[service addReactionWithReaction:emoji];
|
||||
}
|
||||
|
||||
#pragma mark - BWI Helper
|
||||
|
||||
// (bwi #4549): Showing Location Sharing in UI depends on BuildSetting and url from well-known. If there is only the default url that was not overwritten by well-known, the UI will not be shown
|
||||
- (BOOL) bwiShowLocationSharingUI:(MXSession*)session {
|
||||
if (session) {
|
||||
return BWIBuildSettings.shared.locationSharingEnabled && ![session.vc_homeserverConfiguration.tileServer.mapStyleURL.absoluteString isEqualToString:BWIBuildSettings.shared.serverConfigDefaultMapstyleURLString];
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UserSuggestionCoordinatorBridgeDelegate
|
||||
|
||||
- (void)completionSuggestionCoordinatorBridge:(CompletionSuggestionCoordinatorBridge *)coordinator
|
||||
|
||||
Reference in New Issue
Block a user