fix: remove duplicate isSideStore checks with a StoreApp extension

This commit is contained in:
naturecodevoid
2023-04-09 13:51:54 -07:00
parent 62a478277e
commit 5b752cf26e
6 changed files with 24 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ struct AppDetailView: View {
ToolbarItemGroup(placement: .principal) {
HStack {
Spacer()
AppIconView(iconUrl: storeApp.iconURL, isSideStore: storeApp.bundleIdentifier == Bundle.Info.appbundleIdentifier, size: 24)
AppIconView(iconUrl: storeApp.iconURL, isSideStore: storeApp.isSideStore, size: 24)
Text(storeApp.name)
.bold()
Spacer()
@@ -79,7 +79,7 @@ struct AppDetailView: View {
var headerView: some View {
ZStack(alignment: .center) {
GeometryReader { proxy in
AppIconView(iconUrl: storeApp.iconURL, isSideStore: storeApp.bundleIdentifier == Bundle.Info.appbundleIdentifier, size: proxy.frame(in: .global).width)
AppIconView(iconUrl: storeApp.iconURL, isSideStore: storeApp.isSideStore, size: proxy.frame(in: .global).width)
.blur(radius: headerBlurRadius)
.offset(y: min(0, scrollOffset))
}