Merge pull request #2504 from omnivore-app/fix/ios-feature-card-images
Set aspect ratio to fit on feature card images
This commit is contained in:
@ -1400,7 +1400,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
MARKETING_VERSION = 1.28.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
@ -1435,7 +1435,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 12.0;
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
MARKETING_VERSION = 1.28.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -1490,7 +1490,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
MARKETING_VERSION = 1.28.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
PRODUCT_NAME = Omnivore;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@ -1831,7 +1831,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
MARKETING_VERSION = 1.28.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
PRODUCT_NAME = Omnivore;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@ -37,11 +37,14 @@ public struct LibraryFeatureCard: View {
|
||||
AsyncImage(url: imageURL) { phase in
|
||||
switch phase {
|
||||
case .empty:
|
||||
EmptyView()
|
||||
Color.systemBackground
|
||||
.frame(width: 146, height: 90)
|
||||
case let .success(image):
|
||||
image.resizable()
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 146, height: 90)
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.clipped()
|
||||
case .failure:
|
||||
fallbackImage
|
||||
|
||||
@ -50,7 +53,8 @@ public struct LibraryFeatureCard: View {
|
||||
// we need to add this currently unused fallback
|
||||
// to handle any new cases that might be added
|
||||
// in the future:
|
||||
EmptyView()
|
||||
Color.systemBackground
|
||||
.frame(width: 146, height: 90)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user