From 524ec7dcbfc6bec7a86d171d56cb55fdc93ecce2 Mon Sep 17 00:00:00 2001 From: Marcin Czachursk Date: Sat, 8 Apr 2023 18:34:18 +0200 Subject: [PATCH] Fix issue with sending report --- .../Sources/ClientKit/Client+Report.swift | 4 +- .../PixelfedKit/PixelfedClient+Report.swift | 4 +- Vernissage.xcodeproj/project.pbxproj | 52 +++++++------------ .../ComposeView.swift | 0 .../Info.plist | 0 .../NotificationsName.swift | 0 .../ShareViewController.swift | 0 .../VernissageShareExtension.entitlements | 0 .../LazyImageState+ImageResponse.swift | 4 +- .../Extensions/UIImage+Rounded.swift | 2 +- .../Extensions/View+Keyboard.swift | 2 +- 11 files changed, 26 insertions(+), 42 deletions(-) rename {VernissageShareExtension => VernissageShare}/ComposeView.swift (100%) rename {VernissageShareExtension => VernissageShare}/Info.plist (100%) rename {VernissageShareExtension => VernissageShare}/NotificationsName.swift (100%) rename {VernissageShareExtension => VernissageShare}/ShareViewController.swift (100%) rename {VernissageShareExtension => VernissageShare}/VernissageShareExtension.entitlements (100%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/LazyImageState+ImageResponse.swift (81%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/UIImage+Rounded.swift (97%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/View+Keyboard.swift (96%) diff --git a/ClientKit/Sources/ClientKit/Client+Report.swift b/ClientKit/Sources/ClientKit/Client+Report.swift index c6ebfe2..426889d 100644 --- a/ClientKit/Sources/ClientKit/Client+Report.swift +++ b/ClientKit/Sources/ClientKit/Client+Report.swift @@ -9,8 +9,8 @@ import PixelfedKit extension Client { public class Reports: BaseClient { - public func report(objectType: Report.ObjectType, objectId: EntityId, reportType: Report.ReportType) async throws -> Report { - return try await pixelfedClient.report(objectType: objectType, objectId: objectId, reportType: reportType) + public func report(objectType: Report.ObjectType, objectId: EntityId, reportType: Report.ReportType) async throws { + try await pixelfedClient.report(objectType: objectType, objectId: objectId, reportType: reportType) } } } diff --git a/PixelfedKit/Sources/PixelfedKit/PixelfedClient+Report.swift b/PixelfedKit/Sources/PixelfedKit/PixelfedClient+Report.swift index 66ffd4f..e39a9d0 100644 --- a/PixelfedKit/Sources/PixelfedKit/PixelfedClient+Report.swift +++ b/PixelfedKit/Sources/PixelfedKit/PixelfedClient+Report.swift @@ -9,7 +9,7 @@ import Foundation public extension PixelfedClientAuthenticated { func report(objectType: Report.ObjectType, objectId: EntityId, - reportType: Report.ReportType) async throws -> Report { + reportType: Report.ReportType) async throws { let request = try Self.request( for: baseURL, target: Pixelfed.Reports.report(objectType, objectId, reportType), @@ -38,7 +38,5 @@ public extension PixelfedClientAuthenticated { throw NetworkError.notSuccessResponse(response) } - - return try JSONDecoder().decode(Report.self, from: data) } } diff --git a/Vernissage.xcodeproj/project.pbxproj b/Vernissage.xcodeproj/project.pbxproj index d3d1598..f6a6828 100644 --- a/Vernissage.xcodeproj/project.pbxproj +++ b/Vernissage.xcodeproj/project.pbxproj @@ -27,6 +27,7 @@ F835082329BEF9C400DE3247 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F835082629BEF9C400DE3247 /* Localizable.strings */; }; F835082429BEF9C400DE3247 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F835082629BEF9C400DE3247 /* Localizable.strings */; }; F83CBEFB298298A1002972C8 /* ImageCarouselPicture.swift in Sources */ = {isa = PBXBuildFile; fileRef = F83CBEFA298298A1002972C8 /* ImageCarouselPicture.swift */; }; + F858906B29E1CC7A00D4BDED /* UIApplication+Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = F858906A29E1CC7A00D4BDED /* UIApplication+Window.swift */; }; F85D4971296402DC00751DF7 /* AuthorizationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D4970296402DC00751DF7 /* AuthorizationService.swift */; }; F85D4975296407F100751DF7 /* HomeTimelineService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D4974296407F100751DF7 /* HomeTimelineService.swift */; }; F85D497729640A5200751DF7 /* ImageRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D497629640A5200751DF7 /* ImageRow.swift */; }; @@ -81,7 +82,6 @@ F86B7216296BFFDA00EE59EC /* UserProfileStatusesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F86B7215296BFFDA00EE59EC /* UserProfileStatusesView.swift */; }; F86B7221296C49A300EE59EC /* EmptyButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F86B7220296C49A300EE59EC /* EmptyButtonStyle.swift */; }; F8724CE529E1923F001BF518 /* PixelfedKit in Frameworks */ = {isa = PBXBuildFile; productRef = F8724CE429E1923F001BF518 /* PixelfedKit */; }; - F873F14C29BDB67300DE72D1 /* UIImage+Rounded.swift in Sources */ = {isa = PBXBuildFile; fileRef = F873F14B29BDB67300DE72D1 /* UIImage+Rounded.swift */; }; F8742FC429990AFB00E9642B /* ClientError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8742FC329990AFB00E9642B /* ClientError.swift */; }; F8764187298ABB520057D362 /* ViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8764186298ABB520057D362 /* ViewState.swift */; }; F876418D298AE5020057D362 /* PaginableStatusesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F876418C298AE5020057D362 /* PaginableStatusesView.swift */; }; @@ -89,7 +89,6 @@ F87AEB922986C44E00434FB6 /* AuthorizationSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87AEB912986C44E00434FB6 /* AuthorizationSession.swift */; }; F87AEB972986D16D00434FB6 /* AuthorisationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87AEB962986D16D00434FB6 /* AuthorisationError.swift */; }; F883402029B62AE900C3E096 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F883401F29B62AE900C3E096 /* SearchView.swift */; }; - F8864CF129ACFFB80020C534 /* View+Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8864CF029ACFFB80020C534 /* View+Keyboard.swift */; }; F88AB05329B3613900345EDE /* PhotoUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88AB05229B3613900345EDE /* PhotoUrl.swift */; }; F88AB05529B3626300345EDE /* ImageGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88AB05429B3626300345EDE /* ImageGrid.swift */; }; F88AB05829B36B8200345EDE /* AccountsPhotoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88AB05729B36B8200345EDE /* AccountsPhotoView.swift */; }; @@ -101,7 +100,6 @@ F88BC51B29E0350300CE6141 /* ClientKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC51A29E0350300CE6141 /* ClientKit */; }; F88BC51D29E0377B00CE6141 /* AccountData+AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88BC51C29E0377B00CE6141 /* AccountData+AccountModel.swift */; }; F88BC51F29E03ED300CE6141 /* ClientKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC51E29E03ED300CE6141 /* ClientKit */; }; - F88BC52229E03F6D00CE6141 /* View+Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8864CF029ACFFB80020C534 /* View+Keyboard.swift */; }; F88BC52729E0431D00CE6141 /* ServicesKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC52629E0431D00CE6141 /* ServicesKit */; }; F88BC52A29E046D700CE6141 /* WidgetsKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC52929E046D700CE6141 /* WidgetsKit */; }; F88BC52D29E04BB600CE6141 /* EnvironmentKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC52C29E04BB600CE6141 /* EnvironmentKit */; }; @@ -168,12 +166,10 @@ F8B0885E29942E31002AB40A /* ThirdPartyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B0885D29942E31002AB40A /* ThirdPartyView.swift */; }; F8B0886029943498002AB40A /* OtherSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B0885F29943498002AB40A /* OtherSectionView.swift */; }; F8B08862299435C9002AB40A /* SupportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B08861299435C9002AB40A /* SupportView.swift */; }; - F8CAE64029B8E6E1001E0372 /* UIApplication+Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */; }; F8D5444329D4066C002225D6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8D5444229D4066C002225D6 /* AppDelegate.swift */; }; F8DF38E429DD68820047F1AA /* ViewOffsetKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DF38E329DD68820047F1AA /* ViewOffsetKey.swift */; }; F8DF38E629DDB98A0047F1AA /* SocialsSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DF38E529DDB98A0047F1AA /* SocialsSectionView.swift */; }; F8E6D03329CDD52500416CCA /* EditProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E6D03229CDD52500416CCA /* EditProfileView.swift */; }; - F8E9392129C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */; }; F8F6E44229BC58F20004795E /* Vernissage.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = F88C2476295C37BB0006098B /* Vernissage.xcdatamodeld */; }; F8F6E44C29BCC1F70004795E /* SmallWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E44629BCC0DC0004795E /* SmallWidgetView.swift */; }; F8F6E44D29BCC1F90004795E /* MediumWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E44829BCC0F00004795E /* MediumWidgetView.swift */; }; @@ -233,6 +229,7 @@ F837269429A221420098D3C4 /* PixelfedKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = PixelfedKit; sourceTree = ""; }; F83CBEFA298298A1002972C8 /* ImageCarouselPicture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCarouselPicture.swift; sourceTree = ""; }; F844F42429D2DC39000DD896 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + F858906A29E1CC7A00D4BDED /* UIApplication+Window.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIApplication+Window.swift"; sourceTree = ""; }; F85D4970296402DC00751DF7 /* AuthorizationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationService.swift; sourceTree = ""; }; F85D4974296407F100751DF7 /* HomeTimelineService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTimelineService.swift; sourceTree = ""; }; F85D497629640A5200751DF7 /* ImageRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageRow.swift; sourceTree = ""; }; @@ -273,7 +270,6 @@ F86B7213296BFDCE00EE59EC /* UserProfileHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileHeaderView.swift; sourceTree = ""; }; F86B7215296BFFDA00EE59EC /* UserProfileStatusesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileStatusesView.swift; sourceTree = ""; }; F86B7220296C49A300EE59EC /* EmptyButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyButtonStyle.swift; sourceTree = ""; }; - F873F14B29BDB67300DE72D1 /* UIImage+Rounded.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Rounded.swift"; sourceTree = ""; }; F8742FC329990AFB00E9642B /* ClientError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientError.swift; sourceTree = ""; }; F8764186298ABB520057D362 /* ViewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewState.swift; sourceTree = ""; }; F876418C298AE5020057D362 /* PaginableStatusesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginableStatusesView.swift; sourceTree = ""; }; @@ -281,7 +277,6 @@ F87AEB912986C44E00434FB6 /* AuthorizationSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationSession.swift; sourceTree = ""; }; F87AEB962986D16D00434FB6 /* AuthorisationError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorisationError.swift; sourceTree = ""; }; F883401F29B62AE900C3E096 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; - F8864CF029ACFFB80020C534 /* View+Keyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Keyboard.swift"; sourceTree = ""; }; F88AB05229B3613900345EDE /* PhotoUrl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoUrl.swift; sourceTree = ""; }; F88AB05429B3626300345EDE /* ImageGrid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageGrid.swift; sourceTree = ""; }; F88AB05729B36B8200345EDE /* AccountsPhotoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsPhotoView.swift; sourceTree = ""; }; @@ -345,14 +340,12 @@ F8B3699A29D86EB600BE3808 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; F8B3699B29D86EBD00BE3808 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; F8C937A929882CA90004D782 /* Vernissage-001.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-001.xcdatamodel"; sourceTree = ""; }; - F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Window.swift"; sourceTree = ""; }; F8CAE64129B8F1AF001E0372 /* Vernissage-005.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-005.xcdatamodel"; sourceTree = ""; }; F8D5444229D4066C002225D6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; F8DF38E329DD68820047F1AA /* ViewOffsetKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewOffsetKey.swift; sourceTree = ""; }; F8DF38E529DDB98A0047F1AA /* SocialsSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocialsSectionView.swift; sourceTree = ""; }; F8DF38E729DDC3D20047F1AA /* eu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = eu; path = eu.lproj/Localizable.strings; sourceTree = ""; }; F8E6D03229CDD52500416CCA /* EditProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileView.swift; sourceTree = ""; }; - F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LazyImageState+ImageResponse.swift"; sourceTree = ""; }; F8EF371429C624DA00669F45 /* Vernissage-006.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-006.xcdatamodel"; sourceTree = ""; }; F8F6E44329BC5CAA0004795E /* VernissageWidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VernissageWidgetExtension.entitlements; sourceTree = ""; }; F8F6E44429BC5CC50004795E /* Vernissage.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Vernissage.entitlements; sourceTree = ""; }; @@ -470,17 +463,6 @@ path = Views; sourceTree = ""; }; - F8341F94295C63FE009C8EE6 /* Extensions */ = { - isa = PBXGroup; - children = ( - F8864CF029ACFFB80020C534 /* View+Keyboard.swift */, - F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */, - F873F14B29BDB67300DE72D1 /* UIImage+Rounded.swift */, - F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */, - ); - path = Extensions; - sourceTree = ""; - }; F8341F95295C640C009C8EE6 /* Models */ = { isa = PBXGroup; children = ( @@ -548,6 +530,14 @@ path = Widgets; sourceTree = ""; }; + F858906729E1CC2900D4BDED /* Extensions */ = { + isa = PBXGroup; + children = ( + F858906A29E1CC7A00D4BDED /* UIApplication+Window.swift */, + ); + path = Extensions; + sourceTree = ""; + }; F864F76229BB91B400B13921 /* VernissageWidget */ = { isa = PBXGroup; children = ( @@ -626,7 +616,7 @@ path = Subviews; sourceTree = ""; }; - F88BC50329E02F3900CE6141 /* VernissageShareExtension */ = { + F88BC50329E02F3900CE6141 /* VernissageShare */ = { isa = PBXGroup; children = ( F88BC51429E02FEB00CE6141 /* VernissageShareExtension.entitlements */, @@ -635,7 +625,7 @@ F88BC50429E02F3900CE6141 /* ShareViewController.swift */, F88BC50929E02F3900CE6141 /* Info.plist */, ); - path = VernissageShareExtension; + path = VernissageShare; sourceTree = ""; }; F88BC53729E068D200CE6141 /* ViewModifiers */ = { @@ -664,7 +654,7 @@ F8341F96295C6427009C8EE6 /* CoreData */, F88C246A295C37B80006098B /* Vernissage */, F864F76229BB91B400B13921 /* VernissageWidget */, - F88BC50329E02F3900CE6141 /* VernissageShareExtension */, + F88BC50329E02F3900CE6141 /* VernissageShare */, F88C2469295C37B80006098B /* Products */, F89992C5296D3DF8005994BF /* Frameworks */, ); @@ -685,6 +675,7 @@ children = ( F8F6E44429BC5CC50004795E /* Vernissage.entitlements */, F866F6A829604FFF002E8F88 /* Info.plist */, + F858906729E1CC2900D4BDED /* Extensions */, F88BC53729E068D200CE6141 /* ViewModifiers */, F802884D297AEEAA000BDD51 /* Errors */, F86B721F296C498B00EE59EC /* Styles */, @@ -693,7 +684,6 @@ F83901A2295D863B00456AE2 /* Widgets */, F8341F95295C640C009C8EE6 /* Models */, F8B9B354298D4B88009CC69C /* EnvironmentObjects */, - F8341F94295C63FE009C8EE6 /* Extensions */, F8341F93295C63E2009C8EE6 /* Views */, F88C246B295C37B80006098B /* VernissageApp.swift */, F8D5444229D4066C002225D6 /* AppDelegate.swift */, @@ -1022,7 +1012,6 @@ F88BC54F29E073BC00CE6141 /* AccountData+AccountModel.swift in Sources */, F88BC54629E072B500CE6141 /* CoreDataHandler.swift in Sources */, F88BC50529E02F3900CE6141 /* ShareViewController.swift in Sources */, - F88BC52229E03F6D00CE6141 /* View+Keyboard.swift in Sources */, F88BC54129E072A600CE6141 /* CoreDataError.swift in Sources */, F88BC54229E072A900CE6141 /* AttachmentDataHandler.swift in Sources */, F88BC54429E072AF00CE6141 /* ApplicationSettingsHandler.swift in Sources */, @@ -1053,12 +1042,10 @@ F866F6A0296040A8002E8F88 /* ApplicationSettings+CoreDataClass.swift in Sources */, F8210DEA2966E4F9001D9973 /* AnimatePlaceholderModifier.swift in Sources */, F8B08862299435C9002AB40A /* SupportView.swift in Sources */, - F8CAE64029B8E6E1001E0372 /* UIApplication+Window.swift in Sources */, F8B05ACB29B489B100857221 /* HapticsSectionView.swift in Sources */, F88FAD2B295F43B8009B20C9 /* AccountData+CoreDataProperties.swift in Sources */, F85D4975296407F100751DF7 /* HomeTimelineService.swift in Sources */, F80048062961850500E6868A /* StatusData+CoreDataProperties.swift in Sources */, - F8864CF129ACFFB80020C534 /* View+Keyboard.swift in Sources */, F88FAD21295F3944009B20C9 /* HomeFeedView.swift in Sources */, F88C2475295C37BB0006098B /* CoreDataHandler.swift in Sources */, F87AEB972986D16D00434FB6 /* AuthorisationError.swift in Sources */, @@ -1098,12 +1085,12 @@ F89A46DE296EABA20062125F /* StatusPlaceholderView.swift in Sources */, F88C2482295C3A4F0006098B /* StatusView.swift in Sources */, F866F6A329604161002E8F88 /* AccountDataHandler.swift in Sources */, - F8E9392129C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift in Sources */, F89D6C4629718193001DA3D4 /* GeneralSectionView.swift in Sources */, F85D497F296416C800751DF7 /* CommentsSectionView.swift in Sources */, F866F6A529604194002E8F88 /* ApplicationSettingsHandler.swift in Sources */, F8B0885E29942E31002AB40A /* ThirdPartyView.swift in Sources */, F8E6D03329CDD52500416CCA /* EditProfileView.swift in Sources */, + F858906B29E1CC7A00D4BDED /* UIApplication+Window.swift in Sources */, F876418D298AE5020057D362 /* PaginableStatusesView.swift in Sources */, F85D49852964301800751DF7 /* StatusData+Attachments.swift in Sources */, F8764187298ABB520057D362 /* ViewState.swift in Sources */, @@ -1115,7 +1102,6 @@ F866F6A729604629002E8F88 /* SignInView.swift in Sources */, F88C246C295C37B80006098B /* VernissageApp.swift in Sources */, F8121CA8298A86D600B466C7 /* InstanceRowView.swift in Sources */, - F873F14C29BDB67300DE72D1 /* UIImage+Rounded.swift in Sources */, F8D5444329D4066C002225D6 /* AppDelegate.swift in Sources */, F802884F297AEED5000BDD51 /* DatabaseError.swift in Sources */, F86A4307299AA5E900DF7645 /* ThanksView.swift in Sources */, @@ -1232,13 +1218,13 @@ F88BC50D29E02F3900CE6141 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_ENTITLEMENTS = VernissageShareExtension/VernissageShareExtension.entitlements; + CODE_SIGN_ENTITLEMENTS = VernissageShare/VernissageShareExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 99; DEVELOPMENT_TEAM = B2U9FEKYP8; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = VernissageShareExtension/Info.plist; + INFOPLIST_FILE = VernissageShare/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = VernissageShareExtension; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.4; @@ -1260,12 +1246,12 @@ F88BC50E29E02F3900CE6141 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CODE_SIGN_ENTITLEMENTS = VernissageShareExtension/VernissageShareExtension.entitlements; + CODE_SIGN_ENTITLEMENTS = VernissageShare/VernissageShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 99; DEVELOPMENT_TEAM = B2U9FEKYP8; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = VernissageShareExtension/Info.plist; + INFOPLIST_FILE = VernissageShare/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = VernissageShareExtension; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.4; diff --git a/VernissageShareExtension/ComposeView.swift b/VernissageShare/ComposeView.swift similarity index 100% rename from VernissageShareExtension/ComposeView.swift rename to VernissageShare/ComposeView.swift diff --git a/VernissageShareExtension/Info.plist b/VernissageShare/Info.plist similarity index 100% rename from VernissageShareExtension/Info.plist rename to VernissageShare/Info.plist diff --git a/VernissageShareExtension/NotificationsName.swift b/VernissageShare/NotificationsName.swift similarity index 100% rename from VernissageShareExtension/NotificationsName.swift rename to VernissageShare/NotificationsName.swift diff --git a/VernissageShareExtension/ShareViewController.swift b/VernissageShare/ShareViewController.swift similarity index 100% rename from VernissageShareExtension/ShareViewController.swift rename to VernissageShare/ShareViewController.swift diff --git a/VernissageShareExtension/VernissageShareExtension.entitlements b/VernissageShare/VernissageShareExtension.entitlements similarity index 100% rename from VernissageShareExtension/VernissageShareExtension.entitlements rename to VernissageShare/VernissageShareExtension.entitlements diff --git a/Vernissage/Extensions/LazyImageState+ImageResponse.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/LazyImageState+ImageResponse.swift similarity index 81% rename from Vernissage/Extensions/LazyImageState+ImageResponse.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/LazyImageState+ImageResponse.swift index 5999e08..0c445f0 100644 --- a/Vernissage/Extensions/LazyImageState+ImageResponse.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/LazyImageState+ImageResponse.swift @@ -8,8 +8,8 @@ import Foundation import Nuke import NukeUI -extension LazyImageState { - public var imageResponse: ImageResponse? { +public extension LazyImageState { + var imageResponse: ImageResponse? { if case .success(let imageResponse) = result { return imageResponse } diff --git a/Vernissage/Extensions/UIImage+Rounded.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Rounded.swift similarity index 97% rename from Vernissage/Extensions/UIImage+Rounded.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Rounded.swift index bb2ea8b..0e9b473 100644 --- a/Vernissage/Extensions/UIImage+Rounded.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Rounded.swift @@ -8,7 +8,7 @@ import Foundation import SwiftUI import EnvironmentKit -extension UIImage { +public extension UIImage { func roundedAvatar(avatarShape: AvatarShape) -> UIImage { let imageView: UIImageView = UIImageView(image: self) let layer = imageView.layer diff --git a/Vernissage/Extensions/View+Keyboard.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/View+Keyboard.swift similarity index 96% rename from Vernissage/Extensions/View+Keyboard.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/View+Keyboard.swift index 31ebae8..71bb222 100644 --- a/Vernissage/Extensions/View+Keyboard.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/View+Keyboard.swift @@ -7,7 +7,7 @@ import SwiftUI import Combine -extension View { +public extension View { var keyboardPublisher: AnyPublisher { Publishers .Merge(