mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-07 12:58:39 +00:00
Fix some SwiftLint warnings.
This commit is contained in:
@@ -113,7 +113,7 @@ struct CreateRoomScreen: View {
|
||||
if let avatarImage = context.viewState.avatarImage {
|
||||
Image(uiImage: avatarImage)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledToFill()
|
||||
.scaledFrame(size: 70, relativeTo: .title)
|
||||
.avatarShape(context.viewState.isSpace ? .roundedRect : .circle, size: 70)
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ struct TimelineMediaPreviewRedactConfirmationView: View {
|
||||
mediaProvider: context.mediaProvider) {
|
||||
Color.compound.bgSubtleSecondary
|
||||
}
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledToFill()
|
||||
}
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.accessibilityHidden(true)
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ struct NotificationPermissionsScreen: View {
|
||||
Asset.Images.notificationsPromptGraphic
|
||||
.swiftUIImage
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.scaledToFit()
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,6 +461,7 @@ class TimelineInteractionHandler {
|
||||
audioPlayerState(for: itemID)?.setPlaybackSpeed(nextSpeed)
|
||||
}
|
||||
|
||||
// swiftlint:disable:next cyclomatic_complexity
|
||||
func playPauseAudio(for itemID: TimelineItemIdentifier) async {
|
||||
MXLog.info("Toggle play/pause audio for itemID \(itemID)")
|
||||
guard let timelineItem = timelineController.timelineItems.firstUsingStableID(itemID) else {
|
||||
|
||||
@@ -266,11 +266,11 @@ struct TimelineReplyView: View {
|
||||
CompoundIcon(\.image)
|
||||
.padding(4.0)
|
||||
}
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledToFill()
|
||||
case .iconAsset(let asset):
|
||||
Image(asset: asset)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.scaledToFit()
|
||||
.padding(8.0)
|
||||
case .icon(let keyPath):
|
||||
CompoundIcon(keyPath, size: .medium, relativeTo: .body)
|
||||
|
||||
@@ -79,7 +79,7 @@ struct GalleryItemTileView: View {
|
||||
size: item.size,
|
||||
mediaProvider: mediaProvider) { imageView in
|
||||
imageView
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledToFill()
|
||||
} placeholder: {
|
||||
placeholder
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ private struct GalleryListRow: View {
|
||||
size: item.size,
|
||||
mediaProvider: mediaProvider) { imageView in
|
||||
imageView
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledToFill()
|
||||
} placeholder: {
|
||||
Color.compound.bgSubtleSecondary
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user