Skip to content

Commit 4c2bf62

Browse files
committed
Bump base SDK to macOS 12 + fixes for macOS 12
1 parent 856a56c commit 4c2bf62

File tree

12 files changed

+23
-44
lines changed

12 files changed

+23
-44
lines changed

RedditOs.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
CODE_SIGN_IDENTITY = "Apple Development";
679679
CODE_SIGN_STYLE = Automatic;
680680
COMBINE_HIDPI_IMAGES = YES;
681-
CURRENT_PROJECT_VERSION = 19052021;
681+
CURRENT_PROJECT_VERSION = 30072021;
682682
DEVELOPMENT_ASSET_PATHS = "\"RedditOs/Preview Content\"";
683683
DEVELOPMENT_TEAM = Z6P74P6T99;
684684
ENABLE_HARDENED_RUNTIME = YES;
@@ -688,8 +688,8 @@
688688
"$(inherited)",
689689
"@executable_path/../Frameworks",
690690
);
691-
MACOSX_DEPLOYMENT_TARGET = 11.0;
692-
MARKETING_VERSION = 0.5.4;
691+
MACOSX_DEPLOYMENT_TARGET = 12.0;
692+
MARKETING_VERSION = 0.5.5;
693693
PRODUCT_BUNDLE_IDENTIFIER = com.thomasricouard.curiosity;
694694
PRODUCT_NAME = Curiosity;
695695
SWIFT_VERSION = 5.0;
@@ -705,7 +705,7 @@
705705
CODE_SIGN_IDENTITY = "Apple Development";
706706
CODE_SIGN_STYLE = Automatic;
707707
COMBINE_HIDPI_IMAGES = YES;
708-
CURRENT_PROJECT_VERSION = 19052021;
708+
CURRENT_PROJECT_VERSION = 30072021;
709709
DEVELOPMENT_ASSET_PATHS = "\"RedditOs/Preview Content\"";
710710
DEVELOPMENT_TEAM = Z6P74P6T99;
711711
ENABLE_HARDENED_RUNTIME = YES;
@@ -715,8 +715,8 @@
715715
"$(inherited)",
716716
"@executable_path/../Frameworks",
717717
);
718-
MACOSX_DEPLOYMENT_TARGET = 11.0;
719-
MARKETING_VERSION = 0.5.4;
718+
MACOSX_DEPLOYMENT_TARGET = 12.0;
719+
MARKETING_VERSION = 0.5.5;
720720
PRODUCT_BUNDLE_IDENTIFIER = com.thomasricouard.curiosity;
721721
PRODUCT_NAME = Curiosity;
722722
SWIFT_VERSION = 5.0;

RedditOs/Features/Post/PostDetailToolbar.swift

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,14 @@ struct PostDetailToolbar: ToolbarContent {
2020
}
2121

2222
struct SearchView: View {
23-
@State private var isExpanded = false
2423
@EnvironmentObject private var uiState: UIState
2524

2625
var body: some View {
2726
if uiState.displayToolbarSearchBar {
28-
if !isExpanded {
29-
Button {
30-
isExpanded.toggle()
31-
} label: {
32-
Image(systemName: "magnifyingglass")
33-
}
34-
} else {
35-
QuickSearchBar(showSuggestionPopover: true,
36-
onCommit: {},
37-
onCancel: {
38-
self.isExpanded = false
39-
})
40-
.frame(width: 300)
41-
.transition(.slide)
42-
.animation(.easeInOut)
43-
}
27+
QuickSearchBar(showSuggestionPopover: true,
28+
onCommit: {},
29+
onCancel: {})
30+
.frame(width: 250)
4431
}
4532
}
4633
}

RedditOs/Features/Search/Quick/QuickSearchBar.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ struct QuickSearchBar: View {
2727
} onCancel: {
2828
onCancel()
2929
}
30-
.keyboardShortcut("f", modifiers: .command)
31-
.animation(.easeInOut)
3230
.popover(isPresented: $isPopoverPresented) {
3331
ScrollView {
3432
VStack(alignment: .leading) {

RedditOs/Features/Search/Quick/QuickSearchResultRow.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct QuickSearchResultRow: View {
2222
.whenHovered({ hovered in
2323
isHovered = hovered
2424
})
25-
.animation(.interactiveSpring())
25+
.animation(.interactiveSpring(), value: isHovered)
2626
}
2727
}
2828

RedditOs/Features/Search/Shared/SearchBarView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct SearchBarView: View {
2424
} onCommit: {
2525
onCommit()
2626
}
27+
.keyboardShortcut("f", modifiers: .command)
2728
.padding(8)
2829
.background(RoundedRectangle(cornerRadius: 8)
2930
.stroke(isFocused ? Color.accentColor : Color.clear)
@@ -39,7 +40,6 @@ struct SearchBarView: View {
3940
.font(.title2)
4041
}
4142
.buttonStyle(BorderlessButtonStyle())
42-
.animation(.easeInOut)
4343
.transition(.move(edge: .trailing))
4444
}
4545
}

RedditOs/Features/Sidebar/SidebarView.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ struct SidebarView: View {
3030
subscriptionSection
3131
multiSection
3232
}
33-
.listStyle(SidebarListStyle())
34-
.frame(minWidth: 200, idealWidth: 200, maxWidth: 200, maxHeight: .infinity)
33+
.listStyle(.sidebar)
3534
.whenHovered({ hovered in
3635
isHovered = hovered
3736
})
@@ -100,7 +99,7 @@ struct SidebarView: View {
10099
.equatable()) {
101100
Label(LocalizedStringKey(item.rawValue.capitalized), systemImage: item.icon())
102101
}.tag(item.rawValue)
103-
}.animation(nil)
102+
}.animation(nil, value: isHovered)
104103
}
105104
}
106105

@@ -143,10 +142,10 @@ struct SidebarView: View {
143142
.buttonStyle(BorderlessButtonStyle())
144143
}
145144
}
146-
}.animation(nil)
145+
}.animation(nil, value: isHovered)
147146
}
148147
.listItemTint(.redditGold)
149-
.animation(.easeInOut)
148+
.animation(.easeInOut, value: isHovered)
150149
}
151150

152151
private var recentlyVisitedSection: some View {
@@ -184,7 +183,7 @@ struct SidebarView: View {
184183
.buttonStyle(BorderlessButtonStyle())
185184
}
186185
}
187-
}.animation(nil)
186+
}.animation(nil, value: isHovered)
188187
}.listItemTint(.redditBlue)
189188
}
190189
}

RedditOs/Features/Subreddit/SubredditAboutPopoverView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct SubredditAboutPopoverView: View {
5050
}, label: {
5151
Image(systemName: isFavorite ? "star.fill" : "star")
5252
.resizable()
53-
.imageScale(.large)
53+
.frame(width: 16, height: 16)
5454
.foregroundColor(isFavorite ? .redditGold : nil)
5555
}).buttonStyle(BorderlessButtonStyle())
5656
}

RedditOs/Features/Subreddit/SubredditPostRow.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ struct SubredditPostRow: View, Equatable {
7878
Text(url.host ?? url.absoluteString)
7979
.lineLimit(1)
8080
.truncationMode(.tail)
81-
.frame(maxWidth: 250)
8281
}
8382
}
8483
}
@@ -89,7 +88,6 @@ struct SubredditPostRow: View, Equatable {
8988
Spacer()
9089
}
9190
}
92-
.frame(width: 470)
9391
.padding(.vertical, 8)
9492
.contextMenu {
9593
Button {

RedditOs/Features/Subreddit/SubredditPostThumbnailView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct SubredditPostThumbnailView: View {
4848
.padding(.leading, 6)
4949
.padding(.top, -2)
5050
.transition(.move(edge: .top))
51-
.animation(.interactiveSpring())
51+
.animation(.interactiveSpring(), value: post.saved)
5252
}
5353
}.padding(4)
5454
}

RedditOs/Features/Subreddit/SubredditPostsListView.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ struct SubredditPostsListView: View, Equatable {
7373
} onCancel: {
7474

7575
}
76-
.keyboardShortcut("f", modifiers: .command)
7776
.padding(.bottom, 8)
7877
}
7978
},
@@ -85,7 +84,6 @@ struct SubredditPostsListView: View, Equatable {
8584
viewModel.fetchListings(after: viewModel.listings?.last?.id)
8685
}
8786
}
88-
.equatable()
8987
.toolbar {
9088
ToolbarItem(placement: .navigation) {
9189
Group {

0 commit comments

Comments
 (0)