diff --git a/CHANGES_BWI.md b/CHANGES_BWI.md index d7b833b67..33922516d 100644 --- a/CHANGES_BWI.md +++ b/CHANGES_BWI.md @@ -1,4 +1,34 @@ +Changes in BWI project 2.0.0 (2022-11-23) +=================================================== + + +Upstream merge ✨: + +- v1.9.10 + +Features ✨: +- Chat bubbles enabled +- Praise the birthday (#3646) + +Improvements 🙌: +- New Logo (#3719) +- Refactored Buildsettings (#3626) +- Remove Element terms of service view (#3791) +- Remove room settings for DMs to be more similar to Android (#3639) +- being able to change pusher url and change it to push-local (#3637) + +Bugfix 🐛: +- Disable sharing toolbar for pdfs (#3880) +- Fix going into app without pin log in some cases (#3891) + +Translations 🗣 : + +SDK API changes ⚠️: + ++Build 🧱: + + Changes in BWI project 1.26.0 (2022-10-21) =================================================== diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index 6bcb0d468..a59314597 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -397,7 +397,7 @@ class BWIBuildSettings: NSObject { // MARK: - Antivirus scan (bwi=true) - var enableAntivirusScan = false + var enableAntivirusScan = true // MARK: Verification screen (bwi=false) @@ -490,19 +490,17 @@ class BWIBuildSettings: NSObject { var bwiDisableSecuritySettingsUntrustedDevices = true var bwiMatomoTrackingDefaultState = false var bwiShowNewFeatures = true - - // MARK: - Location Sharing - - /// Overwritten by the home server's .well-known configuration (if any exists) - var defaultTileServerMapStyleURL = URL(string: "https://msgpriv.example.com/")! // MARK: - Message Bubbles bwi show in our menu and only for beta builds - var bwiShowMessageBubbles = false + var bwiShowMessageBubbleSettings = false // bwi disable encrypted option in message context menu var roomContextualMenuShowEncryptionOption = false // bwi show new session manager var showSessionManager = false + + // bwi disable side menu coach message + var showSideMenuCoachMessage = false } diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index 02aee8cc1..5688a13f6 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -403,7 +403,7 @@ final class BuildSettings: NSObject { // MARK: - Location Sharing /// Overwritten by the home server's .well-known configuration (if any exists) - static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx")! + static let defaultTileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?")! static let locationSharingEnabled = true diff --git a/Riot/Assets/de.lproj/Bwi.strings b/Riot/Assets/de.lproj/Bwi.strings index 0c4edd7f3..dbbeef1b3 100644 --- a/Riot/Assets/de.lproj/Bwi.strings +++ b/Riot/Assets/de.lproj/Bwi.strings @@ -514,4 +514,9 @@ "bwi_login_protection_error_message" = "Der angegebene Server ist nicht für die Nutzung mit dem %@ vorgesehen"; // MARK: - Polls +"room_event_action_end_poll" = "Umfrage beenden"; +"room_event_action_remove_poll" = "Umfrage entfernen"; +"poll_edit_form_create_poll" = "Umfrage erstellen"; +"poll_edit_form_poll_type" = "Umfragetyp"; "poll_edit_form_poll_type_closed" = "Versteckte Umfrage"; +"poll_edit_form_poll_type_open" = "Offene Umfrage"; diff --git a/Riot/Assets/de.lproj/Localizable.strings b/Riot/Assets/de.lproj/Localizable.strings index 72c3a27a1..036670075 100644 --- a/Riot/Assets/de.lproj/Localizable.strings +++ b/Riot/Assets/de.lproj/Localizable.strings @@ -74,7 +74,7 @@ /* A user has change their name to a new name which we don't know */ "GENERIC_USER_UPDATED_DISPLAYNAME" = "%@ hat den Nicknamen geändert"; - + /** Membership Updates **/ /* A user has change their name to a new name */ diff --git a/Riot/Assets/de.lproj/Vector.strings b/Riot/Assets/de.lproj/Vector.strings index 5e7c7dee1..ad305d121 100644 --- a/Riot/Assets/de.lproj/Vector.strings +++ b/Riot/Assets/de.lproj/Vector.strings @@ -1585,7 +1585,7 @@ "onboarding_splash_page_1_message" = "Sichere und unabhängige Kommunikation, die für die gleiche Vertraulichkeit sorgt, wie ein Gespräch von Angesicht zu Angesicht in deinem eigenen Zuhause."; // Onboarding -"onboarding_splash_register_button_title" = "Konto erstellen"; +"onboarding_splash_register_button_title" = "Konto erstellen"; "settings_enable_room_message_bubbles" = "Nachrichtenblasen"; "poll_edit_form_update_failure_subtitle" = "Bitte erneut versuchen"; "poll_edit_form_poll_type" = "Abstimmungsart"; diff --git a/Riot/Assets/en.lproj/Bwi.strings b/Riot/Assets/en.lproj/Bwi.strings index da20fead6..d2a466bb9 100644 --- a/Riot/Assets/en.lproj/Bwi.strings +++ b/Riot/Assets/en.lproj/Bwi.strings @@ -382,4 +382,9 @@ "bwi_login_protection_error_message" = "The selected server is not allowed for using with %@"; // MARK: - Polls -"poll_edit_form_poll_type_closed" = "Hidden poll"; +"room_event_action_remove_poll" = "Remove poll"; +"room_event_action_end_poll" = "End poll"; +"poll_edit_form_create_poll" = "Create poll"; +"poll_edit_form_poll_type" = "Poll type"; +"poll_edit_form_poll_type_closed" = "Hidden Poll"; +"poll_edit_form_poll_type_open" = "Open poll"; diff --git a/Riot/Assets/new_features.html b/Riot/Assets/new_features.html index 2222ec11e..e7ea4d3d3 100644 --- a/Riot/Assets/new_features.html +++ b/Riot/Assets/new_features.html @@ -33,6 +33,26 @@
Feature-Übersicht ++ Version 2.0.0 +
+ ++ Neue Funktionen +
+ Verbesserungen +
Version 1.26.0 diff --git a/Riot/Generated/BWIStrings.swift b/Riot/Generated/BWIStrings.swift index 71451d355..65242731c 100644 --- a/Riot/Generated/BWIStrings.swift +++ b/Riot/Generated/BWIStrings.swift @@ -835,10 +835,22 @@ public class BWIL10n: NSObject { public static var pinProtectionSettingsSectionHeaderX: String { return BWIL10n.tr("Bwi", "pin_protection_settings_section_header_x") } + /// Umfrage erstellen + public static var pollEditFormCreatePoll: String { + return BWIL10n.tr("Bwi", "poll_edit_form_create_poll") + } + /// Umfragetyp + public static var pollEditFormPollType: String { + return BWIL10n.tr("Bwi", "poll_edit_form_poll_type") + } /// Versteckte Umfrage public static var pollEditFormPollTypeClosed: String { return BWIL10n.tr("Bwi", "poll_edit_form_poll_type_closed") } + /// Offene Umfrage + public static var pollEditFormPollTypeOpen: String { + return BWIL10n.tr("Bwi", "poll_edit_form_poll_type_open") + } /// Wiederholen public static var retry: String { return BWIL10n.tr("Bwi", "retry") @@ -911,10 +923,18 @@ public class BWIL10n: NSObject { public static var roomDetailsTitleForDm: String { return BWIL10n.tr("Bwi", "room_details_title_for_dm") } + /// Umfrage beenden + public static var roomEventActionEndPoll: String { + return BWIL10n.tr("Bwi", "room_event_action_end_poll") + } /// Nachricht teilen public static var roomEventActionPermalink: String { return BWIL10n.tr("Bwi", "room_event_action_permalink") } + /// Umfrage entfernen + public static var roomEventActionRemovePoll: String { + return BWIL10n.tr("Bwi", "room_event_action_remove_poll") + } /// Das ist der Anfang deiner Direktnachricht mit public static var roomIntroCellInformationDmSentence1Part1: String { return BWIL10n.tr("Bwi", "room_intro_cell_information_dm_sentence1_part1") diff --git a/Riot/Managers/LocalAuthentication/LocalAuthenticationService.swift b/Riot/Managers/LocalAuthentication/LocalAuthenticationService.swift index 6ac05a910..247d75dd3 100644 --- a/Riot/Managers/LocalAuthentication/LocalAuthenticationService.swift +++ b/Riot/Managers/LocalAuthentication/LocalAuthenticationService.swift @@ -17,6 +17,8 @@ import Foundation +// bwi: sexucity fix: lastActiveTime is now set by AppDelegate and only when state pinUnLocked is reached + @objcMembers class LocalAuthenticationService: NSObject { @@ -41,7 +43,6 @@ class LocalAuthenticationService: NSObject { } private func setup() { - NotificationCenter.default.addObserver(self, selector: #selector(applicationWillResignActive), name: UIApplication.willResignActiveNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(biometricsDidFallbackToPin), name: .biometricsDidFallbackToPin, object: nil) } @@ -61,8 +62,8 @@ class LocalAuthenticationService: NSObject { var isProtectionSet: Bool { return pinCodePreferences.isPinSet || pinCodePreferences.isBiometricsSet } - - func applicationWillResignActive() { + + func setLastActiveTime() { appLastActiveTime = systemUptime } diff --git a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift index 2c4da068c..210f394d9 100644 --- a/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift +++ b/Riot/Model/HomeserverConfiguration/HomeserverConfigurationBuilder.swift @@ -75,9 +75,12 @@ final class HomeserverConfigurationBuilder: NSObject { if let mapStyleURLString = wellKnown?.tileServer?.mapStyleURLString, let mapStyleURL = URL(string: mapStyleURLString) { tileServerMapStyleURL = mapStyleURL + } else if let mapStyleURL = URL( string: AppConfigService.shared.serverUrl()) { + tileServerMapStyleURL = mapStyleURL } else { - tileServerMapStyleURL = BWIBuildSettings.shared.defaultTileServerMapStyleURL + tileServerMapStyleURL = BuildSettings.defaultTileServerMapStyleURL } + let tileServerConfiguration = HomeserverTileServerConfiguration(mapStyleURL: tileServerMapStyleURL) diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index b5b054dfd..54cbec540 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -258,6 +258,10 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni */ @property (nonatomic, assign, getter=isClearingCache) BOOL clearingCache; +// bwi: use for setting activetime for pin locking +@property (nonatomic, assign) BOOL isPinUnlocked; +// bwi: use for pin locking false alarms +@property (nonatomic, assign) BOOL isApplicationActiveFromSystemAlert; @end @implementation LegacyAppDelegate @@ -572,6 +576,13 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni self.setPinCoordinatorBridgePresenter.delegate = self; [self.setPinCoordinatorBridgePresenter presentWithMainAppWindow:self.window]; } + + if (self.isPinUnlocked) { + [self.localAuthenticationService setLastActiveTime]; + } + + // bwi: could be a system alert wait for diEnter background + self.isApplicationActiveFromSystemAlert = YES; } - (void)applicationDidEnterBackground:(UIApplication *)application @@ -622,6 +633,9 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni // Pause Voice Broadcast recording if needed [VoiceBroadcastRecorderProvider.shared pauseRecording]; + + // bwi: the app is really going into background + self.isApplicationActiveFromSystemAlert = NO; } - (void)applicationWillEnterForeground:(UIApplication *)application @@ -642,6 +656,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni [self.pushNotificationService applicationDidBecomeActive]; [self configurePinCodeScreenFor:application createIfRequired:NO]; + self.isApplicationActiveFromSystemAlert = NO; } - (void)configurePinCodeScreenFor:(UIApplication *)application @@ -651,12 +666,24 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni { if (self.setPinCoordinatorBridgePresenter) { - // it's already on screen, convert the viewMode - self.setPinCoordinatorBridgePresenter.viewMode = SetPinCoordinatorViewModeUnlock; - return; + // bwi: magic for first start + if (self.isApplicationActiveFromSystemAlert) { + if (self.setPinCoordinatorBridgePresenter.viewMode == SetPinCoordinatorViewModeInactive) + { + [self.setPinCoordinatorBridgePresenter dismissWithMainAppWindow:self.window]; + self.setPinCoordinatorBridgePresenter = nil; + [self afterAppUnlockedByPin:application]; + } + return; + } else { + // it's already on screen, convert the viewMode + self.setPinCoordinatorBridgePresenter.viewMode = SetPinCoordinatorViewModeUnlock; + return; + } } if (createIfRequired) { + self.isPinUnlocked = false; self.setPinCoordinatorBridgePresenter = [[SetPinCoordinatorBridgePresenter alloc] initWithSession:mxSessionArray.firstObject viewMode:SetPinCoordinatorViewModeUnlock]; self.setPinCoordinatorBridgePresenter.delegate = self; [self.setPinCoordinatorBridgePresenter presentWithMainAppWindow:self.window]; @@ -762,6 +789,8 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni [BWIAnalytics.sharedTracker trackEvent:@"Session" action:@"PinLogin"]; + + self.isPinUnlocked = true; [_masterTabBarController bwiOnUnlockedByPin]; [self.delegate legacyAppDelegateDidUnlockPin:self]; @@ -1870,6 +1899,8 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni [pusherHelper savePusherURL]; MXKAccount* account = [MXKAccountManager sharedManager].activeAccounts.firstObject; if ( account ) { + AppConfigService* service = [AppConfigService shared]; + account.pushGatewayURL = [service pusherUrl]; [self.pushNotificationService registerUserNotificationSettings]; } } diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 6c61f2620..e7264913b 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -4292,7 +4292,7 @@ static CGSize kThreadListBarButtonItemImageSize; EventMenuItemType itemType; if (selectedEvent.eventType == MXEventTypePollStart) { - title = [VectorL10n roomEventActionRemovePoll]; + title = [BWIL10n roomEventActionRemovePoll]; itemType = EventMenuItemTypeRemovePoll; } else @@ -4331,7 +4331,7 @@ static CGSize kThreadListBarButtonItemImageSize; if ([self.delegate roomViewController:self canEndPollWithEventIdentifier:selectedEvent.eventId]) { [self.eventMenuBuilder addItemWithType:EventMenuItemTypeEndPoll - action:[UIAlertAction actionWithTitle:[VectorL10n roomEventActionEndPoll] + action:[UIAlertAction actionWithTitle:[BWIL10n roomEventActionEndPoll] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); @@ -7625,6 +7625,10 @@ static CGSize kThreadListBarButtonItemImageSize; MXKUTI *fileUTI = [[MXKUTI alloc] initWithLocalFileURL:url]; NSString *mimeType = fileUTI.mimeType; + if (mimeType == nil) { + mimeType = @""; + } + if (fileUTI.isImage) { NSData *imageData = [[NSData alloc] initWithContentsOfURL:url]; diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index cedb5a913..515af3545 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -3338,20 +3338,22 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti - (void)onRoomAvatarTap:(UITapGestureRecognizer *)recognizer { - SingleImagePickerPresenter *singleImagePickerPresenter = [[SingleImagePickerPresenter alloc] initWithSession:self.mainSession]; - singleImagePickerPresenter.delegate = self; - - UIView *sourceView; - - NSIndexPath *indexPath = [_tableViewSections exactIndexPathForRowTag:ROOM_SETTINGS_MAIN_SECTION_ROW_PHOTO sectionTag:SECTION_TAG_MAIN]; - if (indexPath) - { - sourceView = [self.tableView cellForRowAtIndexPath:indexPath]; + if (!mxRoom.isDirect || BWIBuildSettings.shared.showUnrelatedRoomSettingsForDirectMessages) { + SingleImagePickerPresenter *singleImagePickerPresenter = [[SingleImagePickerPresenter alloc] initWithSession:self.mainSession]; + singleImagePickerPresenter.delegate = self; + + UIView *sourceView; + + NSIndexPath *indexPath = [_tableViewSections exactIndexPathForRowTag:ROOM_SETTINGS_MAIN_SECTION_ROW_PHOTO sectionTag:SECTION_TAG_MAIN]; + if (indexPath) + { + sourceView = [self.tableView cellForRowAtIndexPath:indexPath]; + } + + [singleImagePickerPresenter presentFrom:self sourceView:sourceView sourceRect:sourceView.bounds animated:YES]; + + self.imagePickerPresenter = singleImagePickerPresenter; } - - [singleImagePickerPresenter presentFrom:self sourceView:sourceView sourceRect:sourceView.bounds animated:YES]; - - self.imagePickerPresenter = singleImagePickerPresenter; } - (void)toggleRoomNotification:(UISwitch*)theSwitch diff --git a/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewModel.swift b/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewModel.swift index fe65d1371..55272c3fb 100644 --- a/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewModel.swift +++ b/Riot/Modules/SetPinCode/SetupBiometrics/SetupBiometricsViewModel.swift @@ -105,6 +105,7 @@ final class SetupBiometricsViewModel: SetupBiometricsViewModelType { // biometrics can't be used until further unlock with pin or a new log in self.pinCodePreferences.canUseBiometricsToUnlock = false self.coordinatorDelegate?.setupBiometricsViewModelDidCompleteWithReset(self, dueToTooManyErrors: true) + self.userCancelledUnlockWithBiometrics() } else if nsError.code == LAError.Code.userCancel.rawValue || nsError.code == LAError.Code.userFallback.rawValue { self.userCancelledUnlockWithBiometrics() } else { diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index de973352f..8db2aecf4 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -4959,7 +4959,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> if (RiotSettings.shared.settingsScreenShowSimpleTimeLineOptions) { [timelineSection addRowWithTag:TIMELINE_SIMPLE_INDEX]; } else { - if (BWIBuildSettings.shared.bwiShowMessageBubbles) + if (BWIBuildSettings.shared.bwiShowMessageBubbleSettings) { [timelineSection addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX]; } diff --git a/Riot/Modules/TabBar/TabBarCoordinator.swift b/Riot/Modules/TabBar/TabBarCoordinator.swift index 2a020650b..8d0c36ba8 100644 --- a/Riot/Modules/TabBar/TabBarCoordinator.swift +++ b/Riot/Modules/TabBar/TabBarCoordinator.swift @@ -759,7 +759,7 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { private var windowOverlay: WindowOverlayPresenter? func showCoachMessageIfNeeded(with session: MXSession) { - if !RiotSettings.shared.slideMenuRoomsCoachMessageHasBeenDisplayed { + if !RiotSettings.shared.slideMenuRoomsCoachMessageHasBeenDisplayed && BWIBuildSettings.shared.showSideMenuCoachMessage { let isAuthenticated = MXKAccountManager.shared().activeAccounts.first != nil || MXKAccountManager.shared().accounts.first?.isSoftLogout == false if isAuthenticated, let spaceService = session.spaceService, masterTabBarController.presentedViewController == nil, navigationRouter.modules.count == 1 { diff --git a/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/Test/Unit/LiveLocationSharingViewerViewModelTests.swift b/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/Test/Unit/LiveLocationSharingViewerViewModelTests.swift index 26c100f62..cefe1c2ed 100644 --- a/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/Test/Unit/LiveLocationSharingViewerViewModelTests.swift +++ b/RiotSwiftUI/Modules/LocationSharing/LiveLocationSharingViewer/Test/Unit/LiveLocationSharingViewerViewModelTests.swift @@ -27,7 +27,7 @@ class LiveLocationSharingViewerViewModelTests: XCTestCase { override func setUpWithError() throws { service = MockLiveLocationSharingViewerService() - viewModel = LiveLocationSharingViewerViewModel(mapStyleURL: BWIBuildSettings.shared.defaultTileServerMapStyleURL, service: service) + viewModel = LiveLocationSharingViewerViewModel(mapStyleURL: BuildSettings.defaultTileServerMapStyleURL, service: service) context = viewModel.context } } diff --git a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift index 12d8807d5..e0ee45cc9 100644 --- a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift +++ b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift @@ -97,7 +97,7 @@ struct PollEditForm: View { }) } ToolbarItem(placement: .principal) { - Text(VectorL10n.pollEditFormCreatePoll) + Text(BWIL10n.pollEditFormCreatePoll) .font(.headline) .foregroundColor(theme.colors.primaryContent) } diff --git a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift index c0f07333d..d3cfe0db6 100644 --- a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift +++ b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift @@ -23,7 +23,7 @@ struct PollEditFormTypePicker: View { var body: some View { VStack(alignment: .leading, spacing: 16.0) { - Text(VectorL10n.pollEditFormPollType) + Text(BWIL10n.pollEditFormPollType) .font(theme.fonts.title3SB) .foregroundColor(theme.colors.primaryContent) PollEditFormTypeButton(type: .disclosed, selectedType: $selectedType) @@ -62,7 +62,7 @@ private struct PollEditFormTypeButton: View { private var title: String { switch type { case .disclosed: - return VectorL10n.pollEditFormPollTypeOpen + return BWIL10n.pollEditFormPollTypeOpen case .undisclosed: return BWIL10n.pollEditFormPollTypeClosed } diff --git a/bwi/ServerMaintenance/ServerDowntimeDefaultService.swift b/bwi/ServerMaintenance/ServerDowntimeDefaultService.swift index 8ef716f28..5b79e0663 100644 --- a/bwi/ServerMaintenance/ServerDowntimeDefaultService.swift +++ b/bwi/ServerMaintenance/ServerDowntimeDefaultService.swift @@ -24,6 +24,7 @@ fileprivate let BWI_ServerDowntimes = "BWI_ServerDowntimes" fileprivate let BWI_ValidAppVersions = "BWI_ValidAppVersions" fileprivate let exampleFile = "exampleDowntime" +fileprivate let maintenanceURL = "/_matrix/cmaintenance" @objcMembers class ServerDowntimeDefaultService : NSObject { @@ -160,7 +161,7 @@ extension ServerDowntimeDefaultService : ServerDowntimeService { } func fetchDowntimesWithDirectRequest(completion: @escaping (Bool) -> Void) { - guard let url = URL(string: "https://msgpriv.example.com/_matrix/cmaintenance") else { + guard let url = URL(string: AppConfigService.shared.serverUrl() + maintenanceURL) else { completion(false) return }