diff --git a/.xcode-version b/.xcode-version new file mode 100644 index 0000000..d7213f3 --- /dev/null +++ b/.xcode-version @@ -0,0 +1 @@ +12.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 611b6de..ca6836b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.1.0 + +* iOS 14 support + ## 1.0.2 * Removed Instabug diff --git a/Puffery.xcodeproj/project.pbxproj b/Puffery.xcodeproj/project.pbxproj index 8db24e1..8ae8b96 100644 --- a/Puffery.xcodeproj/project.pbxproj +++ b/Puffery.xcodeproj/project.pbxproj @@ -357,7 +357,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1160; - LastUpgradeCheck = 1140; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Valentin Knabel"; TargetAttributes = { BA952508245EC51900FFC9E3 = { @@ -568,6 +568,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -776,6 +777,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -838,6 +840,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/Puffery.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Puffery.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8b7d6ce..027ccdc 100644 --- a/Puffery.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Puffery.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -222,8 +222,8 @@ "repositoryURL": "https://github.com/pointfreeco/swift-composable-architecture.git", "state": { "branch": null, - "revision": "b8c67d5d4f27ad3b2f772cf50f91c581fc94611c", - "version": "0.6.0" + "revision": "47a9d368d1f314a630bf91b71acfb5054420eeb3", + "version": "0.8.0" } }, { diff --git a/PufferyKit/Package.swift b/PufferyKit/Package.swift index b448da8..eea7ebb 100644 --- a/PufferyKit/Package.swift +++ b/PufferyKit/Package.swift @@ -30,7 +30,7 @@ let package = Package( .package(name: "Overture", url: "https://github.com/pointfreeco/swift-overture.git", from: "0.5.0"), .package(name: "KeychainSwift", url: "https://github.com/evgenyneu/keychain-swift.git", from: "19.0.0"), // .package(name: "AckeeTracker", url: "https://github.com/vknabel/AckeeTracker-Swift.git", from: "0.1.0"), - .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", from: "0.6.0"), + .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git", from: "0.8.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -64,7 +64,7 @@ let package = Package( .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), ] ), - + .target(name: "DesignSystem", dependencies: [ "PlatformSupport", "PufferyKit", diff --git a/PufferyKit/Sources/PufferyUI/ChannelListPage.swift b/PufferyKit/Sources/PufferyUI/ChannelListPage.swift index d0561a5..73a8886 100644 --- a/PufferyKit/Sources/PufferyUI/ChannelListPage.swift +++ b/PufferyKit/Sources/PufferyUI/ChannelListPage.swift @@ -7,8 +7,8 @@ // import Combine -import SwiftUI import DesignSystem +import SwiftUI enum ChannelSelection: Hashable { case all @@ -21,11 +21,11 @@ struct ChannelListPage: View { @State var presentsSettings = false @State var presentsChannelCreation = false @State var presentsChannelSubscription = false - @State var shouldReload: PassthroughSubject = PassthroughSubject() + @State var shouldReload = PassthroughSubject() @State var selection: ChannelSelection? = UIDevice.current.model == "iPad" ? .all : nil - + var isIpad: Bool { UIDevice.current.model == "iPad" } var body: some View { @@ -34,6 +34,11 @@ struct ChannelListPage: View { Section { NavigationLink(destination: ChannelDetailsPage(), tag: .all, selection: $selection) { Text("ChannelList.All") + .sheet(isPresented: $presentsChannelCreation, onDismiss: shouldReload.send) { + NavigationView { + ChannelCreationPage() + }.navigationViewStyle(StackNavigationViewStyle()) + } } } @@ -54,6 +59,10 @@ struct ChannelListPage: View { Text(channel.title) } } + }.sheet(isPresented: $presentsChannelSubscription, onDismiss: shouldReload.send) { + NavigationView { + ChannelSubscribingPage() + }.navigationViewStyle(StackNavigationViewStyle()) } } }.roundedListStyle(sidebar: false) @@ -64,21 +73,23 @@ struct ChannelListPage: View { } func createChannelHeader() -> some View { - channelsHeader("ChannelList.OwnChannels.SectionTitle", actionText: "ChannelList.OwnChannels.New", action: { self.presentsChannelCreation.toggle() }) - .sheet(isPresented: $presentsChannelCreation, onDismiss: shouldReload.send) { - NavigationView { - ChannelCreationPage() - }.navigationViewStyle(StackNavigationViewStyle()) + HStack { + Text("ChannelList.OwnChannels.SectionTitle") + Spacer() + + Button(action: { DispatchQueue.main.async { + self.presentsChannelCreation.toggle() + } }) { + HStack { + Text("ChannelList.OwnChannels.New") + Image(systemName: "plus.circle").font(.body) + }.foregroundColor(.accentColor) } + } } func subscribeChannelHeader() -> some View { channelsHeader("ChannelList.SubscribeChannels.SectionTitle", actionText: "ChannelList.SubscribeChannels.New", action: { self.presentsChannelSubscription.toggle() }) - .sheet(isPresented: $presentsChannelSubscription, onDismiss: shouldReload.send) { - NavigationView { - ChannelSubscribingPage() - }.navigationViewStyle(StackNavigationViewStyle()) - } } func channelsHeader(_ title: LocalizedStringKey, actionText: LocalizedStringKey, action: @escaping () -> Void) -> some View {