mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Merge branch 'release/v2.6.0' into develop
This commit is contained in:
@@ -616,4 +616,7 @@ class BWIBuildSettings: NSObject {
|
||||
|
||||
// MARK: Rust Encryption
|
||||
var useRustEncryption = false
|
||||
|
||||
// MARK: Sessions Manager
|
||||
var enableNewSessionManagerByDefault = false
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ extension BWIBuildSettings {
|
||||
bwiLocationShareButtonVisible = false
|
||||
bwiLoginFlowLayout = false
|
||||
authScreenShowTestServerOptions = false
|
||||
|
||||
enableNewSessionManagerByDefault = true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2
Podfile
2
Podfile
@@ -43,7 +43,7 @@ when String # specific MatrixSDK released version
|
||||
$matrixSDKVersionSpec = $matrixSDKVersion
|
||||
end
|
||||
|
||||
$matrixSDKVersionSpec = { :git => 'https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk', :tag => 'v0.26.6_bwi' }
|
||||
$matrixSDKVersionSpec = { :git => 'https://dl-gitlab.example.com/bwmessenger/bundesmessenger/bundesmessenger-ios-sdk', :tag => 'v0.26.6.1_bwi' }
|
||||
|
||||
# Method to import the MatrixSDK
|
||||
def import_MatrixSDK
|
||||
|
||||
@@ -147,6 +147,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
enableMaintenanceTimer(true)
|
||||
|
||||
self.bwiCheckForMatomoPromt()
|
||||
BWIAnalytics.sharedTracker.readUserConfig()
|
||||
}
|
||||
|
||||
func bwiOnUnlockedByPin() {
|
||||
@@ -699,7 +700,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
// bwi: check if matomo promt was shown for this session
|
||||
// bwi: check if matomo promt was shown for this session otherwise check if config has changed
|
||||
private func bwiCheckForMatomoPromt() {
|
||||
if BWIBuildSettings.shared.bwiMatomoEnabled && BWIAnalytics.sharedTracker.needsToShowPromt() {
|
||||
self.allChatsViewController.bwiPresentMatomoConsentAlert()
|
||||
@@ -770,6 +771,7 @@ extension AllChatsCoordinator: AllChatsViewControllerDelegate {
|
||||
enableMaintenanceTimer(true)
|
||||
|
||||
self.bwiCheckForMatomoPromt()
|
||||
BWIAnalytics.sharedTracker.resetMatomo()
|
||||
}
|
||||
|
||||
func allChatsViewController(_ allChatsViewController: AllChatsViewController, didSelectRoomWithParameters roomNavigationParameters: RoomNavigationParameters, completion: @escaping () -> Void) {
|
||||
|
||||
@@ -1153,7 +1153,7 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
|
||||
|
||||
settingsViewController.loadViewIfNeeded()
|
||||
AppDelegate.theDelegate().restoreInitialDisplay {
|
||||
if RiotSettings.shared.enableNewSessionManager {
|
||||
if RiotSettings.shared.enableNewSessionManager || BWIBuildSettings.shared.enableNewSessionManagerByDefault {
|
||||
self.navigationController?.viewControllers = [self, settingsViewController]
|
||||
settingsViewController.showUserSessionsFlow()
|
||||
} else {
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
NSString *const kMXKToolsBlockquoteMarkAttribute = @"kMXKToolsBlockquoteMarkAttribute";
|
||||
|
||||
// Regex expression for permalink detection
|
||||
NSString *const kMXKToolsRegexStringForPermalink = @"\\/#\\/(?:(?:room|user)\\/)?([^\\s]*)";
|
||||
|
||||
NSString *const kMXKToolsRegexStringForPermalink = @"(?:\\/.*)\\/#\\/(?:(?:room|user)\\/)?([^\\s]*)";
|
||||
|
||||
#pragma mark - MXKTools static private members
|
||||
// The regex used to find matrix ids.
|
||||
@@ -70,7 +69,7 @@ static NSRegularExpression* permalinkRegex;
|
||||
htmlTagsRegex = [NSRegularExpression regularExpressionWithPattern:@"<(\\w+)[^>]*>" options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
linkDetector = [NSDataDetector dataDetectorWithTypes:NSTextCheckingTypeLink error:nil];
|
||||
|
||||
NSString *permalinkPattern = [NSString stringWithFormat:@"%@%@", BuildSettings.clientPermalinkBaseUrl ?: kMXMatrixDotToUrl, kMXKToolsRegexStringForPermalink];
|
||||
NSString *permalinkPattern = [NSString stringWithFormat:@"%@%@", BWIBuildSettings.shared.clientPermalinkBaseUrl ?: kMXMatrixDotToUrl, kMXKToolsRegexStringForPermalink];
|
||||
permalinkRegex = [NSRegularExpression regularExpressionWithPattern:permalinkPattern options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
});
|
||||
}
|
||||
@@ -1020,6 +1019,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
|
||||
+ (void)createLinksInMutableAttributedString:(NSMutableAttributedString*)mutableAttributedString forEnabledMatrixIds:(NSInteger)enabledMatrixIdsBitMask
|
||||
{
|
||||
|
||||
if (!mutableAttributedString)
|
||||
{
|
||||
return;
|
||||
@@ -1058,6 +1058,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
|
||||
NSString *link = [mutableAttributedString.string substringWithRange:matchRange];
|
||||
// Handle potential permalinks
|
||||
|
||||
if ([permalinkRegex numberOfMatchesInString:link options:0 range:NSMakeRange(0, link.length)]) {
|
||||
NSURLComponents *url = [[NSURLComponents new] initWithString:link];
|
||||
if (url.URL)
|
||||
|
||||
@@ -26,8 +26,8 @@ enum PillType: Codable {
|
||||
@available (iOS 15.0, *)
|
||||
extension PillType {
|
||||
private static var regexPermalinkTarget: NSRegularExpression? = {
|
||||
let clientBaseUrl = BuildSettings.clientPermalinkBaseUrl ?? kMXMatrixDotToUrl
|
||||
let pattern = #"\#(clientBaseUrl)/#/(?:(?:room|user)/)?((?:@|!|#)[^@!#/?\s]*)/?((?:\$)[^\$/?\s]*)?"#
|
||||
let clientBaseUrl = BWIBuildSettings.shared.clientPermalinkBaseUrl
|
||||
let pattern = #"\#(clientBaseUrl)(?:/.*)/#/(?:(?:room|user)/)?((?:@|!|#)[^@!#/?\s]*)/?((?:\$)[^\$/?\s]*)?"#
|
||||
return try? NSRegularExpression(pattern: pattern, options: .caseInsensitive)
|
||||
}()
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ TableViewSectionsDelegate>
|
||||
}
|
||||
|
||||
// Crypto sessions section
|
||||
if (RiotSettings.shared.settingsSecurityScreenShowSessions && !RiotSettings.shared.enableNewSessionManager)
|
||||
if (RiotSettings.shared.settingsSecurityScreenShowSessions && !RiotSettings.shared.enableNewSessionManager && !BWIBuildSettings.shared.enableNewSessionManagerByDefault)
|
||||
{
|
||||
Section *sessionsSection = [Section sectionWithTag:SECTION_CRYPTO_SESSIONS];
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
|
||||
Section *sectionSecurity = [Section sectionWithTag:SECTION_TAG_SECURITY];
|
||||
[sectionSecurity addRowWithTag:SECURITY_BUTTON_INDEX];
|
||||
|
||||
if (RiotSettings.shared.enableNewSessionManager || BWIBuildSettings.shared.showSessionManager)
|
||||
if (RiotSettings.shared.enableNewSessionManager || BWIBuildSettings.shared.enableNewSessionManagerByDefault)
|
||||
{
|
||||
// NOTE: Add device manager entry point in the security section atm for debug purpose
|
||||
[sectionSecurity addRowWithTag:DEVICE_MANAGER_INDEX];
|
||||
|
||||
@@ -115,9 +115,7 @@ import MatomoTracker
|
||||
func resetMatomo() {
|
||||
if BWIBuildSettings.shared.bwiMatomoEnabled {
|
||||
|
||||
if let path = Bundle.main.path(forResource: "trackingConfig", ofType: "json") {
|
||||
analyticsConfig.readConfig(jsonFile: path)
|
||||
}
|
||||
readUserConfig()
|
||||
|
||||
// bwi: Analytics use custom config
|
||||
guard let urlPath = analyticsConfig.selectedBaseURL(),
|
||||
@@ -141,6 +139,16 @@ import MatomoTracker
|
||||
}
|
||||
}
|
||||
|
||||
func deleteMatomo() {
|
||||
matomo = nil
|
||||
}
|
||||
|
||||
func readUserConfig() {
|
||||
if let path = Bundle.main.path(forResource: "trackingConfig", ofType: "json") {
|
||||
analyticsConfig.readConfig(jsonFile: path)
|
||||
}
|
||||
}
|
||||
|
||||
func dispatchAll() {
|
||||
if fastRunning {
|
||||
matomo?.dispatch()
|
||||
|
||||
Reference in New Issue
Block a user