mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Switch to Xcode 14 and handle the UICollectionView-backed List. (#229)
* Fix Timeline on Xcode 14/iOS 16
Raise requirement to iOS 16+
Reduce pagination jumping.
Sonarcloud fixes.
Fix verification test.
Adopt if let optional { syntax.
* Remove unused ScrollViewReader
The ScrollViewReader didn't appear to change the behaviour.
* Fix warnings on Run Scripts.
Run script build phase 'SwiftLint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
This commit is contained in:
@@ -31,7 +31,7 @@ struct MediaProvider: MediaProviderProtocol {
|
||||
}
|
||||
|
||||
func imageFromSource(_ source: MediaSource?, avatarSize: AvatarSize?) -> UIImage? {
|
||||
guard let source = source else {
|
||||
guard let source else {
|
||||
return nil
|
||||
}
|
||||
let cacheKey = cacheKeyForURLString(source.underlyingSource.url(), avatarSize: avatarSize)
|
||||
@@ -39,7 +39,7 @@ struct MediaProvider: MediaProviderProtocol {
|
||||
}
|
||||
|
||||
func imageFromURLString(_ urlString: String?, avatarSize: AvatarSize?) -> UIImage? {
|
||||
guard let urlString = urlString else {
|
||||
guard let urlString else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ struct MediaProvider: MediaProviderProtocol {
|
||||
|
||||
do {
|
||||
let imageData = try await Task.detached { () -> Data in
|
||||
if let avatarSize = avatarSize {
|
||||
if let avatarSize {
|
||||
return try await clientProxy.loadMediaThumbnailForSource(source.underlyingSource, width: UInt(avatarSize.scaledValue), height: UInt(avatarSize.scaledValue))
|
||||
} else {
|
||||
return try await clientProxy.loadMediaContentForSource(source.underlyingSource)
|
||||
@@ -97,7 +97,7 @@ struct MediaProvider: MediaProviderProtocol {
|
||||
// MARK: - Private
|
||||
|
||||
private func cacheKeyForURLString(_ urlString: String, avatarSize: AvatarSize?) -> String {
|
||||
if let avatarSize = avatarSize {
|
||||
if let avatarSize {
|
||||
return "\(urlString){\(avatarSize.scaledValue),\(avatarSize.scaledValue)}"
|
||||
} else {
|
||||
return urlString
|
||||
|
||||
@@ -31,7 +31,7 @@ struct MockMediaProvider: MediaProviderProtocol {
|
||||
return nil
|
||||
}
|
||||
|
||||
if let avatarSize = avatarSize {
|
||||
if let avatarSize {
|
||||
switch avatarSize {
|
||||
case .room:
|
||||
return Asset.Images.appLogo.image
|
||||
|
||||
Reference in New Issue
Block a user