mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-04 23:17:43 +02:00
Merge commit '80bda1906235b6007b98f18fb13681fff587f4a3' into feature/basis_update_192
# Conflicts: # Config/AppVersion.xcconfig # Config/BuildSettings.swift # DesignKit/Source/ColorsSwiftUI.swift # DesignKit/Source/FontsSwiftUI.swift # DesignKit/Source/ThemeV2.swift # DesignKit/Variants/Colors/Dark/DarkColors.swift # DesignKit/Variants/Colors/Light/LightColors.swift # Podfile.lock # Riot/Assets/de.lproj/InfoPlist.strings # Riot/Assets/de.lproj/Vector.strings # Riot/Assets/en.lproj/Vector.strings # Riot/Generated/Images.swift # Riot/Generated/Strings.swift # Riot/Managers/PushNotification/PushNotificationService.m # Riot/Managers/Settings/RiotSettings.swift # Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h # Riot/Modules/Common/Recents/RecentsViewController.m # Riot/Modules/Communities/Home/GroupHomeViewController.m # Riot/Modules/Room/RoomViewController.m # Riot/Modules/SetPinCode/PinCodePreferences.swift # Riot/Modules/Settings/SettingsViewController.m # Riot/Modules/TabBar/MasterTabBarController.h # Riot/Modules/TabBar/MasterTabBarController.m # Riot/Modules/TabBar/TabBarCoordinator.swift # fastlane/Fastfile # project.yml
This commit is contained in:
@@ -99,7 +99,6 @@ typedef enum : NSUInteger {
|
||||
@property (nonatomic) BOOL treatMatrixRoomIdAsLink;
|
||||
@property (nonatomic) BOOL treatMatrixRoomAliasAsLink;
|
||||
@property (nonatomic) BOOL treatMatrixEventIdAsLink;
|
||||
@property (nonatomic) BOOL treatMatrixGroupIdAsLink;
|
||||
|
||||
/**
|
||||
Initialise the event formatter.
|
||||
|
||||
@@ -1022,21 +1022,6 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MXEventTypeRoomRelatedGroups:
|
||||
{
|
||||
NSArray *groups;
|
||||
MXJSONModelSetArray(groups, event.content[@"groups"]);
|
||||
if (groups)
|
||||
{
|
||||
displayText = [VectorL10n noticeRoomRelatedGroups:[groups componentsJoinedByString:@", "]];
|
||||
// Append redacted info if any
|
||||
if (redactedInfo)
|
||||
{
|
||||
displayText = [NSString stringWithFormat:@"%@\n %@", displayText, redactedInfo];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MXEventTypeRoomEncrypted:
|
||||
{
|
||||
// Is redacted?
|
||||
@@ -2081,12 +2066,6 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
|
||||
{
|
||||
enabledMatrixIdsBitMask |= MXKTOOLS_EVENT_IDENTIFIER_BITWISE;
|
||||
}
|
||||
|
||||
// If enabled, make group id clickable
|
||||
if (_treatMatrixGroupIdAsLink)
|
||||
{
|
||||
enabledMatrixIdsBitMask |= MXKTOOLS_GROUP_IDENTIFIER_BITWISE;
|
||||
}
|
||||
|
||||
[MXKTools createLinksInMutableAttributedString:mutableAttributedString forEnabledMatrixIds:enabledMatrixIdsBitMask];
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ extension MarkdownToHTMLRenderer: MarkdownToHTMLRendererProtocol {
|
||||
ast.repairLinks()
|
||||
return try DownHTMLRenderer.astToHTML(ast, options: options)
|
||||
} catch {
|
||||
MXLog.error("[MarkdownToHTMLRenderer] renderToHTML failed with string: \(markdown)")
|
||||
MXLog.error("[MarkdownToHTMLRenderer] renderToHTML failed")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#define MXKTOOLS_ROOM_IDENTIFIER_BITWISE 0x02
|
||||
#define MXKTOOLS_ROOM_ALIAS_BITWISE 0x04
|
||||
#define MXKTOOLS_EVENT_IDENTIFIER_BITWISE 0x08
|
||||
#define MXKTOOLS_GROUP_IDENTIFIER_BITWISE 0x10
|
||||
|
||||
// Attribute in an NSAttributeString that marks a blockquote block that was in the original HTML string.
|
||||
extern NSString *const kMXKToolsBlockquoteMarkAttribute;
|
||||
|
||||
@@ -42,7 +42,6 @@ static NSRegularExpression *userIdRegex;
|
||||
static NSRegularExpression *roomIdRegex;
|
||||
static NSRegularExpression *roomAliasRegex;
|
||||
static NSRegularExpression *eventIdRegex;
|
||||
static NSRegularExpression *groupIdRegex;
|
||||
// A regex to find http URLs.
|
||||
static NSRegularExpression *httpLinksRegex;
|
||||
// A regex to find all HTML tags
|
||||
@@ -59,7 +58,6 @@ static NSRegularExpression *htmlTagsRegex;
|
||||
roomIdRegex = [NSRegularExpression regularExpressionWithPattern:kMXToolsRegexStringForMatrixRoomIdentifier options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
roomAliasRegex = [NSRegularExpression regularExpressionWithPattern:kMXToolsRegexStringForMatrixRoomAlias options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
eventIdRegex = [NSRegularExpression regularExpressionWithPattern:kMXToolsRegexStringForMatrixEventIdentifier options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
groupIdRegex = [NSRegularExpression regularExpressionWithPattern:kMXToolsRegexStringForMatrixGroupIdentifier options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
|
||||
httpLinksRegex = [NSRegularExpression regularExpressionWithPattern:@"(?i)\\b(https?://\\S*)\\b" options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
htmlTagsRegex = [NSRegularExpression regularExpressionWithPattern:@"<(\\w+)[^>]*>" options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
@@ -1039,12 +1037,6 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
{
|
||||
[MXKTools createLinksInMutableAttributedString:mutableAttributedString matchingRegex:eventIdRegex];
|
||||
}
|
||||
|
||||
// If enabled, make group id clickable
|
||||
if (enabledMatrixIdsBitMask & MXKTOOLS_GROUP_IDENTIFIER_BITWISE)
|
||||
{
|
||||
[MXKTools createLinksInMutableAttributedString:mutableAttributedString matchingRegex:groupIdRegex];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)createLinksInMutableAttributedString:(NSMutableAttributedString*)mutableAttributedString matchingRegex:(NSRegularExpression*)regex
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MXKVideoThumbnailGenerator: NSObject {
|
||||
let image = try assetImageGenerator.copyCGImage(at: .zero, actualTime: nil)
|
||||
thumbnailImage = UIImage(cgImage: image)
|
||||
} catch {
|
||||
MXLog.error(error.localizedDescription)
|
||||
MXLog.error("[MXKVideoThumbnailGenerator] generateThumbnail:", context: error)
|
||||
thumbnailImage = nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user