Merge pull request #6198 from BlueWallet/iOS-Widgets-have-a-black-border,-introduced-in-todays-update-#6191

FIX: iOS Widgets have a black border, introduced in todays update #6191
This commit is contained in:
GLaDOS 2024-02-28 18:15:08 +00:00 committed by GitHub
commit 20c798dbdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 0 deletions

View File

@ -90,12 +90,14 @@ struct WalletInformationWidget: Widget {
}
.configurationDisplayName("Balance")
.description("View your accumulated balance.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
} else {
return StaticConfiguration(kind: kind, provider: WalletInformationWidgetProvider()) { entry in
WalletInformationWidgetEntryView(entry: entry)
}
.configurationDisplayName("Balance")
.description("View your accumulated balance.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
}
}
}

View File

@ -87,12 +87,14 @@ struct MarketWidget: Widget {
}
.configurationDisplayName("Market")
.description("View the current market information.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
} else {
return StaticConfiguration(kind: kind, provider: MarketWidgetProvider()) { entry in
MarketWidgetEntryView(entry: entry)
}
.configurationDisplayName("Market")
.description("View the current market information.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
}
}
}

View File

@ -99,12 +99,14 @@ struct PriceWidgetProvider: TimelineProvider {
}
.configurationDisplayName("Price")
.description("View the current price of Bitcoin.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
} else {
return StaticConfiguration(kind: kind, provider: PriceWidgetProvider()) { entry in
PriceWidgetEntryView(entry: entry)
}
.configurationDisplayName("Price")
.description("View the current price of Bitcoin.").supportedFamilies([.systemSmall])
.contentMarginsDisabledIfAvailable()
}
}
}

View File

@ -119,6 +119,7 @@ struct WalletInformationAndMarketWidget: Widget {
}
.configurationDisplayName("Wallet and Market")
.description("View your total wallet balance and network prices.").supportedFamilies([.systemMedium, .systemLarge])
.contentMarginsDisabledIfAvailable()
}
}

View File

@ -19,3 +19,18 @@ struct Widgets: WidgetBundle {
WalletInformationAndMarketWidget()
}
}
extension WidgetConfiguration
{
func contentMarginsDisabledIfAvailable() -> some WidgetConfiguration
{
if #available(iOSApplicationExtension 17.0, *)
{
return self.contentMarginsDisabled()
}
else
{
return self
}
}
}