mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
replaced UIColor link with ThemeService links color everywhere it was used, and included the ThemeService in NSE and SiriIntents
This commit is contained in:
@@ -51,7 +51,7 @@ class HTMLFormatter: NSObject {
|
||||
DTDefaultFontName: font.fontName,
|
||||
DTDefaultFontSize: font.pointSize,
|
||||
DTDefaultLinkDecoration: false,
|
||||
DTDefaultLinkColor: UIColor.link,
|
||||
DTDefaultLinkColor: ThemeService.shared().theme.colors.links,
|
||||
DTWillFlushBlockCallBack: sanitizeCallback
|
||||
]
|
||||
options.merge(extraOptions) { (_, new) in new }
|
||||
|
||||
@@ -1052,7 +1052,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
NSURLComponents *url = [[NSURLComponents new] initWithURL:matchUrl resolvingAgainstBaseURL:NO];
|
||||
if (url.URL)
|
||||
{
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:matchRange];
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.colors.links range:matchRange];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
if (NSIntersectionRange(match.range, linkMatch.range).length == match.range.length)
|
||||
{
|
||||
// but before we set the right color
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:linkMatch.range];
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.colors.links range:linkMatch.range];
|
||||
hasAlreadyLink = YES;
|
||||
break;
|
||||
}
|
||||
@@ -1118,7 +1118,7 @@ manualChangeMessageForVideo:(NSString*)manualChangeMessageForVideo
|
||||
NSString *link = [mutableAttributedString.string substringWithRange:match.range];
|
||||
link = [link stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
[mutableAttributedString addAttribute:NSLinkAttributeName value:link range:match.range];
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:[UIColor linkColor] range:match.range];
|
||||
[mutableAttributedString addAttribute:NSForegroundColorAttributeName value:ThemeService.shared.theme.colors.links range:match.range];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -23,4 +23,6 @@
|
||||
|
||||
#import "BuildInfo.h"
|
||||
|
||||
#import "ThemeService.h"
|
||||
|
||||
#endif /* RiotNSE_Bridging_Header_h */
|
||||
|
||||
@@ -78,3 +78,5 @@ targets:
|
||||
- "**/*.md" # excludes all files with the .md extension
|
||||
- path: ../Riot/Modules/Room/TimelineCells/Styles/RoomTimelineStyleIdentifier.swift
|
||||
- path: ../Riot/Modules/VoiceBroadcast/VoiceBroadcastSDK/MatrixSDK
|
||||
- path: ../Riot/Managers/Theme
|
||||
- path: ../Riot/Categories/UIColor.swift
|
||||
|
||||
@@ -16,3 +16,4 @@
|
||||
|
||||
#import "MatrixKit-Bridging-Header.h"
|
||||
#import "BuildInfo.h"
|
||||
#import "ThemeService.h"
|
||||
|
||||
@@ -66,3 +66,5 @@ targets:
|
||||
- "**/*.md" # excludes all files with the .md extension
|
||||
- path: ../Riot/Modules/Room/TimelineCells/Styles/RoomTimelineStyleIdentifier.swift
|
||||
- path: ../Riot/Modules/VoiceBroadcast/VoiceBroadcastSDK/MatrixSDK
|
||||
- path: ../Riot/Managers/Theme
|
||||
- path: ../Riot/Categories/UIColor.swift
|
||||
|
||||
Reference in New Issue
Block a user