diff --git a/Localization/app.json b/Localization/app.json index f370022ab..a631f61d6 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -154,7 +154,7 @@ "emoji": "Emoji" } }, - "firendship": { + "friendship": { "follow": "Follow", "following": "Following", "request": "Request", @@ -170,7 +170,7 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit info" + "edit_info": "Edit Info" }, "timeline": { "timestamp": { @@ -465,7 +465,7 @@ "hashtags": "Hashtags" }, "recent_search": "Recent searches", - "clear": "clear" + "clear": "Clear" } }, "hashtag": { diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 91a63516d..6a29831ea 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -31,7 +31,7 @@ 164F0EBC267D4FE400249499 /* BoopSound.caf in Resources */ = {isa = PBXBuildFile; fileRef = 164F0EBB267D4FE400249499 /* BoopSound.caf */; }; 18BC7629F65E6DB12CB8416D /* Pods_Mastodon_MastodonUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C030226D3C73DCC23D67452 /* Pods_Mastodon_MastodonUITests.framework */; }; 2D04F42525C255B9003F936F /* APIService+PublicTimeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D04F42425C255B9003F936F /* APIService+PublicTimeline.swift */; }; - 2D084B8D26258EA3003AA3AF /* NotificationViewModel+diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D084B8C26258EA3003AA3AF /* NotificationViewModel+diffable.swift */; }; + 2D084B8D26258EA3003AA3AF /* NotificationViewModel+Diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D084B8C26258EA3003AA3AF /* NotificationViewModel+Diffable.swift */; }; 2D084B9326259545003AA3AF /* NotificationViewModel+LoadLatestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D084B9226259545003AA3AF /* NotificationViewModel+LoadLatestState.swift */; }; 2D0B7A1D261D839600B44727 /* SearchHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D0B7A1C261D839600B44727 /* SearchHistory.swift */; }; 2D152A8C25C295CC009AA50C /* StatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D152A8B25C295CC009AA50C /* StatusView.swift */; }; @@ -620,8 +620,9 @@ 0FB3D33125E5F50E00AAD544 /* PickServerSearchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickServerSearchCell.swift; sourceTree = ""; }; 0FB3D33725E6401400AAD544 /* PickServerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickServerCell.swift; sourceTree = ""; }; 164F0EBB267D4FE400249499 /* BoopSound.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = BoopSound.caf; sourceTree = ""; }; + 1D6D967E77A5357E2C6110D9 /* Pods-Mastodon.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon.asdk - debug.xcconfig"; path = "Target Support Files/Pods-Mastodon/Pods-Mastodon.asdk - debug.xcconfig"; sourceTree = ""; }; 2D04F42425C255B9003F936F /* APIService+PublicTimeline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APIService+PublicTimeline.swift"; sourceTree = ""; }; - 2D084B8C26258EA3003AA3AF /* NotificationViewModel+diffable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationViewModel+diffable.swift"; sourceTree = ""; }; + 2D084B8C26258EA3003AA3AF /* NotificationViewModel+Diffable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationViewModel+Diffable.swift"; sourceTree = ""; }; 2D084B9226259545003AA3AF /* NotificationViewModel+LoadLatestState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationViewModel+LoadLatestState.swift"; sourceTree = ""; }; 2D0B7A1C261D839600B44727 /* SearchHistory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchHistory.swift; sourceTree = ""; }; 2D152A8B25C295CC009AA50C /* StatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusView.swift; sourceTree = ""; }; @@ -733,9 +734,11 @@ 2DFAD5362617010500F9EE7C /* SearchingTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchingTableViewCell.swift; sourceTree = ""; }; 2E1F6A67FDF9771D3E064FDC /* Pods-Mastodon.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon.debug.xcconfig"; path = "Target Support Files/Pods-Mastodon/Pods-Mastodon.debug.xcconfig"; sourceTree = ""; }; 374AA339A20E0FAC75BCDA6D /* Pods_NotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B7FD8F28DDA8FBCE5562B78 /* Pods-NotificationService.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.asdk - debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.asdk - debug.xcconfig"; sourceTree = ""; }; 3C030226D3C73DCC23D67452 /* Pods_Mastodon_MastodonUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Mastodon_MastodonUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 452147B2903DF38070FE56A2 /* Pods_MastodonTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MastodonTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 459EA4F43058CAB47719E963 /* Pods-Mastodon-MastodonUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.debug.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.debug.xcconfig"; sourceTree = ""; }; + 46DAB0EBDDFB678347CD96FF /* Pods-MastodonTests.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MastodonTests.asdk - release.xcconfig"; path = "Target Support Files/Pods-MastodonTests/Pods-MastodonTests.asdk - release.xcconfig"; sourceTree = ""; }; 5B24BBD7262DB14800A9381B /* ReportViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReportViewModel.swift; sourceTree = ""; }; 5B24BBD8262DB14800A9381B /* ReportViewModel+Diffable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ReportViewModel+Diffable.swift"; sourceTree = ""; }; 5B24BBE1262DB19100A9381B /* APIService+Report.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "APIService+Report.swift"; sourceTree = ""; }; @@ -770,17 +773,22 @@ 5DF1058425F88AE500D6C0D4 /* NeedsDependency+AVPlayerViewControllerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NeedsDependency+AVPlayerViewControllerDelegate.swift"; sourceTree = ""; }; 5DFC35DE262068D20045711D /* SearchViewController+Follow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchViewController+Follow.swift"; sourceTree = ""; }; 75E3471C898DDD9631729B6E /* Pods-Mastodon.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon.release.xcconfig"; path = "Target Support Files/Pods-Mastodon/Pods-Mastodon.release.xcconfig"; sourceTree = ""; }; + 7CEFFAE9AF9284B13C0A758D /* Pods-MastodonTests.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MastodonTests.asdk - debug.xcconfig"; path = "Target Support Files/Pods-MastodonTests/Pods-MastodonTests.asdk - debug.xcconfig"; sourceTree = ""; }; 819CEC9DCAD8E8E7BD85A7BB /* Pods-Mastodon.asdk.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon.asdk.xcconfig"; path = "Target Support Files/Pods-Mastodon/Pods-Mastodon.asdk.xcconfig"; sourceTree = ""; }; + 8850E70A1D5FF51432E43653 /* Pods-Mastodon-MastodonUITests.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.asdk - release.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.asdk - release.xcconfig"; sourceTree = ""; }; 8ED8C4B1F1BA2DCFF2926BB1 /* Pods-Mastodon-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-Mastodon-NotificationService/Pods-Mastodon-NotificationService.debug.xcconfig"; sourceTree = ""; }; 9553C689FFA9EBC880CAB78D /* Pods-NotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.debug.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.debug.xcconfig"; sourceTree = ""; }; 9776D7C4B79101CF70181127 /* Pods-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.release.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.release.xcconfig"; sourceTree = ""; }; 9780A4C98FFC65B32B50D1C0 /* Pods-MastodonTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MastodonTests.release.xcconfig"; path = "Target Support Files/Pods-MastodonTests/Pods-MastodonTests.release.xcconfig"; sourceTree = ""; }; 9A0982D8F349244EB558CDFD /* Pods-AppShared.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.debug.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.debug.xcconfig"; sourceTree = ""; }; + 9CFF58FD900AC059428700E7 /* Pods-NotificationService.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationService.asdk - release.xcconfig"; path = "Target Support Files/Pods-NotificationService/Pods-NotificationService.asdk - release.xcconfig"; sourceTree = ""; }; A4ABE34829701A4496C5BB64 /* Pods_Mastodon.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Mastodon.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A67FD038ECDA0E411AF8DB4D /* Pods-Mastodon-MastodonUITests.asdk.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.asdk.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.asdk.xcconfig"; sourceTree = ""; }; + A9B1FB898DFD6063B044298C /* Pods-AppShared.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.asdk - debug.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.asdk - debug.xcconfig"; sourceTree = ""; }; B31D44635FCF6452F7E1B865 /* Pods-Mastodon-AppShared.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-AppShared.release.xcconfig"; path = "Target Support Files/Pods-Mastodon-AppShared/Pods-Mastodon-AppShared.release.xcconfig"; sourceTree = ""; }; B44342AC2B6585F8295F1DDF /* Pods-Mastodon-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-NotificationService.release.xcconfig"; path = "Target Support Files/Pods-Mastodon-NotificationService/Pods-Mastodon-NotificationService.release.xcconfig"; sourceTree = ""; }; BB482D32A7B9825BF5327C4F /* Pods-Mastodon-MastodonUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.release.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.release.xcconfig"; sourceTree = ""; }; + BD7598A87F4497045EDEF252 /* Pods-Mastodon.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon.asdk - release.xcconfig"; path = "Target Support Files/Pods-Mastodon/Pods-Mastodon.asdk - release.xcconfig"; sourceTree = ""; }; CD92E0F10BDE4FE7C4B999F2 /* Pods_MastodonTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MastodonTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D7D7CF93E262178800077512 /* Pods-Mastodon-AppShared.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-AppShared.debug.xcconfig"; path = "Target Support Files/Pods-Mastodon-AppShared/Pods-Mastodon-AppShared.debug.xcconfig"; sourceTree = ""; }; DB0140CE25C42AEE00F9F3CF /* OSLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSLog.swift; sourceTree = ""; }; @@ -1091,6 +1099,8 @@ DBF96325262EC0A6001D8D25 /* AuthenticationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AuthenticationServices.framework; path = System/Library/Frameworks/AuthenticationServices.framework; sourceTree = SDKROOT; }; DBF98149265E24F500E4BA07 /* ProfileFieldCollectionViewHeaderFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileFieldCollectionViewHeaderFooterView.swift; sourceTree = ""; }; DBF9814B265E339500E4BA07 /* ProfileFieldAddEntryCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileFieldAddEntryCollectionViewCell.swift; sourceTree = ""; }; + DDB1B139FA8EA26F510D58B6 /* Pods-AppShared.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.asdk - release.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.asdk - release.xcconfig"; sourceTree = ""; }; + E5C7236E58D14A0322FE00F2 /* Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig"; sourceTree = ""; }; EC6E707B68A67DB08EC288FA /* Pods-MastodonTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MastodonTests.debug.xcconfig"; path = "Target Support Files/Pods-MastodonTests/Pods-MastodonTests.debug.xcconfig"; sourceTree = ""; }; ECA373ABA86BE3C2D7ED878E /* Pods-AppShared.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.release.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.release.xcconfig"; sourceTree = ""; }; EE13214BC0246BE5210CCC10 /* Pods-AppShared.asdk.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.asdk.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.asdk.xcconfig"; sourceTree = ""; }; @@ -1271,6 +1281,16 @@ A67FD038ECDA0E411AF8DB4D /* Pods-Mastodon-MastodonUITests.asdk.xcconfig */, 5DA82A9B4ABDAFA3AB9A49C7 /* Pods-MastodonTests.asdk.xcconfig */, F31E7502A7E3945B98C6CBAF /* Pods-NotificationService.asdk.xcconfig */, + A9B1FB898DFD6063B044298C /* Pods-AppShared.asdk - debug.xcconfig */, + DDB1B139FA8EA26F510D58B6 /* Pods-AppShared.asdk - release.xcconfig */, + 1D6D967E77A5357E2C6110D9 /* Pods-Mastodon.asdk - debug.xcconfig */, + BD7598A87F4497045EDEF252 /* Pods-Mastodon.asdk - release.xcconfig */, + E5C7236E58D14A0322FE00F2 /* Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig */, + 8850E70A1D5FF51432E43653 /* Pods-Mastodon-MastodonUITests.asdk - release.xcconfig */, + 7CEFFAE9AF9284B13C0A758D /* Pods-MastodonTests.asdk - debug.xcconfig */, + 46DAB0EBDDFB678347CD96FF /* Pods-MastodonTests.asdk - release.xcconfig */, + 3B7FD8F28DDA8FBCE5562B78 /* Pods-NotificationService.asdk - debug.xcconfig */, + 9CFF58FD900AC059428700E7 /* Pods-NotificationService.asdk - release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -2310,7 +2330,7 @@ children = ( DB9D6BF725E4F5690051B173 /* NotificationViewController.swift */, 2D607AD726242FC500B70763 /* NotificationViewModel.swift */, - 2D084B8C26258EA3003AA3AF /* NotificationViewModel+diffable.swift */, + 2D084B8C26258EA3003AA3AF /* NotificationViewModel+Diffable.swift */, 2D084B9226259545003AA3AF /* NotificationViewModel+LoadLatestState.swift */, 2D24E12C2626FD2E00A59D4F /* NotificationViewModel+LoadOldestState.swift */, 2D35237F26256F470031AF25 /* TableViewCell */, @@ -3281,7 +3301,7 @@ DB789A1C25F9F76A0071ACA0 /* ComposeStatusContentCollectionViewCell.swift in Sources */, DB1FD43625F26899004CFCFC /* MastodonPickServerViewModel+LoadIndexedServerState.swift in Sources */, 2D939AE825EE1CF80076FA61 /* MastodonRegisterViewController+Avatar.swift in Sources */, - 2D084B8D26258EA3003AA3AF /* NotificationViewModel+diffable.swift in Sources */, + 2D084B8D26258EA3003AA3AF /* NotificationViewModel+Diffable.swift in Sources */, DB6D1B24263684C600ACB481 /* UserDefaults.swift in Sources */, DB1D186C25EF5BA7003F1F23 /* PollTableView.swift in Sources */, DBA94434265CBB5300C537E1 /* ProfileFieldSection.swift in Sources */, @@ -3768,7 +3788,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -3776,7 +3796,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3795,7 +3815,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -3803,7 +3823,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -4052,7 +4072,7 @@ }; name = Release; }; - DBCBCC0E2680BE3E000F5B51 /* ASDK */ = { + DBCBCC0E2680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -4112,18 +4132,18 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = ASDK; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC0F2680BE3E000F5B51 /* ASDK */ = { + DBCBCC0F2680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 819CEC9DCAD8E8E7BD85A7BB /* Pods-Mastodon.asdk.xcconfig */; + baseConfigurationReference = BD7598A87F4497045EDEF252 /* Pods-Mastodon.asdk - release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = Mastodon/Info.plist; @@ -4131,7 +4151,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -4139,11 +4159,11 @@ SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC102680BE3E000F5B51 /* ASDK */ = { + DBCBCC102680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5DA82A9B4ABDAFA3AB9A49C7 /* Pods-MastodonTests.asdk.xcconfig */; + baseConfigurationReference = 46DAB0EBDDFB678347CD96FF /* Pods-MastodonTests.asdk - release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -4160,11 +4180,11 @@ TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mastodon.app/Mastodon"; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC112680BE3E000F5B51 /* ASDK */ = { + DBCBCC112680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A67FD038ECDA0E411AF8DB4D /* Pods-Mastodon-MastodonUITests.asdk.xcconfig */; + baseConfigurationReference = 8850E70A1D5FF51432E43653 /* Pods-Mastodon-MastodonUITests.asdk - release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 5Z4GVSS33P; @@ -4180,9 +4200,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = Mastodon; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC122680BE3E000F5B51 /* ASDK */ = { + DBCBCC122680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; @@ -4209,9 +4229,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC132680BE3E000F5B51 /* ASDK */ = { + DBCBCC132680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; @@ -4229,15 +4249,15 @@ TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mastodon.app/Mastodon"; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC142680BE3E000F5B51 /* ASDK */ = { + DBCBCC142680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F31E7502A7E3945B98C6CBAF /* Pods-NotificationService.asdk.xcconfig */; + baseConfigurationReference = 9CFF58FD900AC059428700E7 /* Pods-NotificationService.asdk - release.xcconfig */; buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4245,18 +4265,18 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; - name = ASDK; + name = "ASDK - Release"; }; - DBCBCC152680BE3E000F5B51 /* ASDK */ = { + DBCBCC152680BE3E000F5B51 /* ASDK - Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EE13214BC0246BE5210CCC10 /* Pods-AppShared.asdk.xcconfig */; + baseConfigurationReference = DDB1B139FA8EA26F510D58B6 /* Pods-AppShared.asdk - release.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; @@ -4283,15 +4303,194 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = ASDK; + name = "ASDK - Release"; }; - DBF8AE1C263293E400C9C23C /* Debug */ = { + DBCBCC1E26818F6F000F5B51 /* ASDK - Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9553C689FFA9EBC880CAB78D /* Pods-NotificationService.debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + 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; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG ASDK"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = "ASDK - Debug"; + }; + DBCBCC1F26818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1D6D967E77A5357E2C6110D9 /* Pods-Mastodon.asdk - debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 18; + DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets"; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + INFOPLIST_FILE = Mastodon/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 0.7.2; + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "ASDK - Debug"; + }; + DBCBCC2026818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7CEFFAE9AF9284B13C0A758D /* Pods-MastodonTests.asdk - debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + INFOPLIST_FILE = MastodonTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.MastodonTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mastodon.app/Mastodon"; + }; + name = "ASDK - Debug"; + }; + DBCBCC2126818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E5C7236E58D14A0322FE00F2 /* Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + INFOPLIST_FILE = MastodonUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.MastodonUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Mastodon; + }; + name = "ASDK - Debug"; + }; + DBCBCC2226818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = CoreDataStack/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.CoreDataStack; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = "ASDK - Debug"; + }; + DBCBCC2326818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + INFOPLIST_FILE = CoreDataStackTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.CoreDataStackTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mastodon.app/Mastodon"; + }; + name = "ASDK - Debug"; + }; + DBCBCC2426818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B7FD8F28DDA8FBCE5562B78 /* Pods-NotificationService.asdk - debug.xcconfig */; buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4299,7 +4498,61 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "ASDK - Debug"; + }; + DBCBCC2526818F6F000F5B51 /* ASDK - Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A9B1FB898DFD6063B044298C /* Pods-AppShared.asdk - debug.xcconfig */; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = AppShared/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.AppShared; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = "ASDK - Debug"; + }; + DBF8AE1C263293E400C9C23C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9553C689FFA9EBC880CAB78D /* Pods-NotificationService.debug.xcconfig */; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 18; + DEVELOPMENT_TEAM = 5Z4GVSS33P; + INFOPLIST_FILE = NotificationService/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4314,7 +4567,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 18; DEVELOPMENT_TEAM = 5Z4GVSS33P; INFOPLIST_FILE = NotificationService/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -4322,7 +4575,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 0.7.1; + MARKETING_VERSION = 0.7.2; PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -4338,7 +4591,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB427DFA25BAA00100D1B89D /* Debug */, - DBCBCC0E2680BE3E000F5B51 /* ASDK */, + DBCBCC1E26818F6F000F5B51 /* ASDK - Debug */, + DBCBCC0E2680BE3E000F5B51 /* ASDK - Release */, DB427DFB25BAA00100D1B89D /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4348,7 +4602,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB427DFD25BAA00100D1B89D /* Debug */, - DBCBCC0F2680BE3E000F5B51 /* ASDK */, + DBCBCC1F26818F6F000F5B51 /* ASDK - Debug */, + DBCBCC0F2680BE3E000F5B51 /* ASDK - Release */, DB427DFE25BAA00100D1B89D /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4358,7 +4613,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB427E0025BAA00100D1B89D /* Debug */, - DBCBCC102680BE3E000F5B51 /* ASDK */, + DBCBCC2026818F6F000F5B51 /* ASDK - Debug */, + DBCBCC102680BE3E000F5B51 /* ASDK - Release */, DB427E0125BAA00100D1B89D /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4368,7 +4624,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB427E0325BAA00100D1B89D /* Debug */, - DBCBCC112680BE3E000F5B51 /* ASDK */, + DBCBCC2126818F6F000F5B51 /* ASDK - Debug */, + DBCBCC112680BE3E000F5B51 /* ASDK - Release */, DB427E0425BAA00100D1B89D /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4378,7 +4635,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB6804892637CD4C00430867 /* Debug */, - DBCBCC152680BE3E000F5B51 /* ASDK */, + DBCBCC2526818F6F000F5B51 /* ASDK - Debug */, + DBCBCC152680BE3E000F5B51 /* ASDK - Release */, DB68048A2637CD4C00430867 /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4388,7 +4646,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB89BA0625C10FD0008580ED /* Debug */, - DBCBCC122680BE3E000F5B51 /* ASDK */, + DBCBCC2226818F6F000F5B51 /* ASDK - Debug */, + DBCBCC122680BE3E000F5B51 /* ASDK - Release */, DB89BA0725C10FD0008580ED /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4398,7 +4657,8 @@ isa = XCConfigurationList; buildConfigurations = ( DB89BA0A25C10FD0008580ED /* Debug */, - DBCBCC132680BE3E000F5B51 /* ASDK */, + DBCBCC2326818F6F000F5B51 /* ASDK - Debug */, + DBCBCC132680BE3E000F5B51 /* ASDK - Release */, DB89BA0B25C10FD0008580ED /* Release */, ); defaultConfigurationIsVisible = 0; @@ -4408,7 +4668,8 @@ isa = XCConfigurationList; buildConfigurations = ( DBF8AE1C263293E400C9C23C /* Debug */, - DBCBCC142680BE3E000F5B51 /* ASDK */, + DBCBCC2426818F6F000F5B51 /* ASDK - Debug */, + DBCBCC142680BE3E000F5B51 /* ASDK - Release */, DBF8AE1D263293E400C9C23C /* Release */, ); defaultConfigurationIsVisible = 0; diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index 87ae76985..ffae1ea21 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ CoreDataStack.xcscheme_^#shared#^_ orderHint - 31 + 21 Mastodon - ASDK.xcscheme_^#shared#^_ @@ -37,7 +37,7 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 30 + 22 SuppressBuildableAutocreation diff --git a/Mastodon/Coordinator/SceneCoordinator.swift b/Mastodon/Coordinator/SceneCoordinator.swift index f0ffcc892..a12a72d93 100644 --- a/Mastodon/Coordinator/SceneCoordinator.swift +++ b/Mastodon/Coordinator/SceneCoordinator.swift @@ -48,8 +48,10 @@ extension SceneCoordinator { case mastodonResendEmail(viewModel: MastodonResendEmailViewModel) case mastodonWebView(viewModel:WebViewModel) + #if ASDK // ASDK case asyncHome + #endif // compose case compose(viewModel: ComposeViewModel) @@ -239,9 +241,11 @@ private extension SceneCoordinator { let _viewController = WebViewController() _viewController.viewModel = viewModel viewController = _viewController + #if ASDK case .asyncHome: let _viewController = AsyncHomeTimelineViewController() viewController = _viewController + #endif case .compose(let viewModel): let _viewController = ComposeViewController() _viewController.viewModel = viewModel diff --git a/Mastodon/Diffiable/DataSource/ASTableNode.swift b/Mastodon/Diffiable/DataSource/ASTableNode.swift index f2849cfe8..36ff1fb07 100644 --- a/Mastodon/Diffiable/DataSource/ASTableNode.swift +++ b/Mastodon/Diffiable/DataSource/ASTableNode.swift @@ -5,6 +5,8 @@ // Created by Cirno MainasuK on 2021-6-19. // +#if ASDK + import UIKit import AsyncDisplayKit import DifferenceKit @@ -79,3 +81,5 @@ extension ASTableNode: ReloadableTableView { } } } + +#endif diff --git a/Mastodon/Diffiable/DataSource/TableNodeDiffableDataSource.swift b/Mastodon/Diffiable/DataSource/TableNodeDiffableDataSource.swift index 508f07de9..155c8d8af 100644 --- a/Mastodon/Diffiable/DataSource/TableNodeDiffableDataSource.swift +++ b/Mastodon/Diffiable/DataSource/TableNodeDiffableDataSource.swift @@ -5,6 +5,8 @@ // Created by Cirno MainasuK on 2021-6-19. // +#if ASDK + import UIKit import AsyncDisplayKit import DiffableDataSources @@ -109,3 +111,5 @@ open class TableNodeDiffableDataSource String { - return L10n.tr("Localizable", "Common.Controls.Firendship.BlockDomain", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.BlockDomain", String(describing: p1)) } /// Blocked - internal static let blocked = L10n.tr("Localizable", "Common.Controls.Firendship.Blocked") + internal static let blocked = L10n.tr("Localizable", "Common.Controls.Friendship.Blocked") /// Block %@ internal static func blockUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.BlockUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.BlockUser", String(describing: p1)) } - /// Edit info - internal static let editInfo = L10n.tr("Localizable", "Common.Controls.Firendship.EditInfo") + /// Edit Info + internal static let editInfo = L10n.tr("Localizable", "Common.Controls.Friendship.EditInfo") /// Follow - internal static let follow = L10n.tr("Localizable", "Common.Controls.Firendship.Follow") + internal static let follow = L10n.tr("Localizable", "Common.Controls.Friendship.Follow") /// Following - internal static let following = L10n.tr("Localizable", "Common.Controls.Firendship.Following") + internal static let following = L10n.tr("Localizable", "Common.Controls.Friendship.Following") /// Mute - internal static let mute = L10n.tr("Localizable", "Common.Controls.Firendship.Mute") + internal static let mute = L10n.tr("Localizable", "Common.Controls.Friendship.Mute") /// Muted - internal static let muted = L10n.tr("Localizable", "Common.Controls.Firendship.Muted") + internal static let muted = L10n.tr("Localizable", "Common.Controls.Friendship.Muted") /// Mute %@ internal static func muteUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.MuteUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.MuteUser", String(describing: p1)) } /// Pending - internal static let pending = L10n.tr("Localizable", "Common.Controls.Firendship.Pending") + internal static let pending = L10n.tr("Localizable", "Common.Controls.Friendship.Pending") /// Request - internal static let request = L10n.tr("Localizable", "Common.Controls.Firendship.Request") + internal static let request = L10n.tr("Localizable", "Common.Controls.Friendship.Request") /// Unblock - internal static let unblock = L10n.tr("Localizable", "Common.Controls.Firendship.Unblock") + internal static let unblock = L10n.tr("Localizable", "Common.Controls.Friendship.Unblock") /// Unblock %@ internal static func unblockUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.UnblockUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.UnblockUser", String(describing: p1)) } /// Unmute - internal static let unmute = L10n.tr("Localizable", "Common.Controls.Firendship.Unmute") + internal static let unmute = L10n.tr("Localizable", "Common.Controls.Friendship.Unmute") /// Unmute %@ internal static func unmuteUser(_ p1: Any) -> String { - return L10n.tr("Localizable", "Common.Controls.Firendship.UnmuteUser", String(describing: p1)) + return L10n.tr("Localizable", "Common.Controls.Friendship.UnmuteUser", String(describing: p1)) } } internal enum Keyboard { @@ -843,7 +843,7 @@ internal enum L10n { internal static let placeholder = L10n.tr("Localizable", "Scene.Search.Searchbar.Placeholder") } internal enum Searching { - /// clear + /// Clear internal static let clear = L10n.tr("Localizable", "Scene.Search.Searching.Clear") /// Recent searches internal static let recentSearch = L10n.tr("Localizable", "Scene.Search.Searching.RecentSearch") diff --git a/Mastodon/Protocol/StatusProvider/StatusProvider+StatusNodeDelegate.swift b/Mastodon/Protocol/StatusProvider/StatusProvider+StatusNodeDelegate.swift index b8734a3c8..918e960f4 100644 --- a/Mastodon/Protocol/StatusProvider/StatusProvider+StatusNodeDelegate.swift +++ b/Mastodon/Protocol/StatusProvider/StatusProvider+StatusNodeDelegate.swift @@ -5,6 +5,8 @@ // Created by Cirno MainasuK on 2021-6-20. // +#if ASDK + import Foundation import ActiveLabel @@ -14,3 +16,5 @@ extension StatusNodeDelegate where Self: StatusProvider { StatusProviderFacade.responseToStatusActiveLabelAction(provider: self, node: node, didSelectActiveEntityType: type) } } + +#endif diff --git a/Mastodon/Protocol/StatusProvider/StatusProvider.swift b/Mastodon/Protocol/StatusProvider/StatusProvider.swift index 78bed66c5..cc0b690f6 100644 --- a/Mastodon/Protocol/StatusProvider/StatusProvider.swift +++ b/Mastodon/Protocol/StatusProvider/StatusProvider.swift @@ -9,7 +9,10 @@ import UIKit import Combine import CoreData import CoreDataStack + +#if ASDK import AsyncDisplayKit +#endif protocol StatusProvider: NeedsDependency & DisposeBagCollectable & UIViewController { // async @@ -23,11 +26,15 @@ protocol StatusProvider: NeedsDependency & DisposeBagCollectable & UIViewControl func item(for cell: UITableViewCell?, indexPath: IndexPath?) -> Item? func items(indexPaths: [IndexPath]) -> [Item] + #if ASDK func status(node: ASCellNode?, indexPath: IndexPath?) -> Status? + #endif } +#if ASDK extension StatusProvider { func status(node: ASCellNode?, indexPath: IndexPath?) -> Status? { fatalError("Needs implement this") } } +#endif diff --git a/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift b/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift index ff5b61583..4d5ea5fc1 100644 --- a/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift +++ b/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift @@ -12,7 +12,10 @@ import CoreData import CoreDataStack import MastodonSDK import ActiveLabel + +#if ASDK import AsyncDisplayKit +#endif enum StatusProviderFacade { } @@ -146,6 +149,7 @@ extension StatusProviderFacade { } } + #if ASDK static func responseToStatusActiveLabelAction(provider: StatusProvider, node: ASCellNode, didSelectActiveEntityType type: ActiveEntityType) { switch type { case .hashtag(let text, _): @@ -175,6 +179,7 @@ extension StatusProviderFacade { guard let status = provider.status(node: node, indexPath: nil) else { return } coordinateToStatusMentionProfileScene(for: target, provider: provider, status: status, mention: mention) } + #endif private static func coordinateToStatusMentionProfileScene(for target: Target, provider: StatusProvider, cell: UITableViewCell, mention: String) { provider.status(for: cell, indexPath: nil) diff --git a/Mastodon/Protocol/UserProvider/UserProviderFacade.swift b/Mastodon/Protocol/UserProvider/UserProviderFacade.swift index 1f9215a76..b5e381f1b 100644 --- a/Mastodon/Protocol/UserProvider/UserProviderFacade.swift +++ b/Mastodon/Protocol/UserProvider/UserProviderFacade.swift @@ -164,9 +164,9 @@ extension UserProviderFacade { if !isMyself { // mute let muteAction = UIAction( - title: isMuting ? L10n.Common.Controls.Firendship.unmuteUser(name) : L10n.Common.Controls.Firendship.mute, + title: isMuting ? L10n.Common.Controls.Friendship.unmuteUser(name) : L10n.Common.Controls.Friendship.mute, image: isMuting ? UIImage(systemName: "speaker") : UIImage(systemName: "speaker.slash"), - discoverabilityTitle: isMuting ? nil : L10n.Common.Controls.Firendship.muteUser(name), + discoverabilityTitle: isMuting ? nil : L10n.Common.Controls.Friendship.muteUser(name), attributes: isMuting ? [] : .destructive, state: .off ) { [weak provider] _ in @@ -186,7 +186,7 @@ extension UserProviderFacade { if isMuting { children.append(muteAction) } else { - let muteMenu = UIMenu(title: L10n.Common.Controls.Firendship.muteUser(name), image: UIImage(systemName: "speaker.slash"), options: [], children: [muteAction]) + let muteMenu = UIMenu(title: L10n.Common.Controls.Friendship.muteUser(name), image: UIImage(systemName: "speaker.slash"), options: [], children: [muteAction]) children.append(muteMenu) } } @@ -194,9 +194,9 @@ extension UserProviderFacade { if !isMyself { // block let blockAction = UIAction( - title: isBlocking ? L10n.Common.Controls.Firendship.unblockUser(name) : L10n.Common.Controls.Firendship.block, + title: isBlocking ? L10n.Common.Controls.Friendship.unblockUser(name) : L10n.Common.Controls.Friendship.block, image: isBlocking ? UIImage(systemName: "hand.raised.slash") : UIImage(systemName: "hand.raised"), - discoverabilityTitle: isBlocking ? nil : L10n.Common.Controls.Firendship.blockUser(name), + discoverabilityTitle: isBlocking ? nil : L10n.Common.Controls.Friendship.blockUser(name), attributes: isBlocking ? [] : .destructive, state: .off ) { [weak provider] _ in @@ -216,7 +216,7 @@ extension UserProviderFacade { if isBlocking { children.append(blockAction) } else { - let blockMenu = UIMenu(title: L10n.Common.Controls.Firendship.blockUser(name), image: UIImage(systemName: "hand.raised"), options: [], children: [blockAction]) + let blockMenu = UIMenu(title: L10n.Common.Controls.Friendship.blockUser(name), image: UIImage(systemName: "hand.raised"), options: [], children: [blockAction]) children.append(blockMenu) } } diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json index 625cb0904..a0a28b621 100644 --- a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,103 +1,103 @@ { "images" : [ { - "filename" : "Icon-Small-40.png", + "filename" : "icon_20pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { - "filename" : "notification-icon@3x.png", + "filename" : "icon_20pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { - "filename" : "Icon-Small@2x-1.png", + "filename" : "icon_29pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { - "filename" : "Icon-Small@3x.png", + "filename" : "icon_29pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { - "filename" : "Icon-Small-40@2x.png", + "filename" : "icon_40pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { - "filename" : "Icon-60@2x.png", + "filename" : "icon_40pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { - "filename" : "icon-60@2x-1.png", + "filename" : "icon_60pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { - "filename" : "Icon-60@3x.png", + "filename" : "icon_60pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { - "filename" : "notification-icon~ipad.png", + "filename" : "icon_20pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { - "filename" : "Icon-Small-41.png", + "filename" : "icon_20pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { - "filename" : "Icon-Small.png", + "filename" : "icon_29pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { - "filename" : "Icon-Small@2x.png", + "filename" : "icon_29pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { - "filename" : "Icon-Small-42.png", + "filename" : "icon_40pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { - "filename" : "Icon-Small-40@2x-1.png", + "filename" : "icon_40pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { - "filename" : "Icon-76.png", + "filename" : "icon_76pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { - "filename" : "Icon-76@2x.png", + "filename" : "icon_76pt@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { - "filename" : "Icon-83.5@2x.png", + "filename" : "icon_83.5@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png deleted file mode 100644 index ef12e2f50..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png deleted file mode 100644 index 3057b7780..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png deleted file mode 100644 index 42cdffed8..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png deleted file mode 100644 index aea203fb5..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png deleted file mode 100644 index 69c2b4e9e..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png deleted file mode 100644 index 63350076c..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png deleted file mode 100644 index 3a92c0d61..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png deleted file mode 100644 index 3a92c0d61..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png deleted file mode 100644 index 63350076c..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png deleted file mode 100644 index 63350076c..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small-42.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png deleted file mode 100644 index 26a937e35..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png deleted file mode 100644 index d9296bdb7..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png deleted file mode 100644 index d9296bdb7..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png deleted file mode 100644 index e98e3f3cf..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png deleted file mode 100644 index 96cde3e35..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x-1.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt.png new file mode 100644 index 000000000..ae8e49ce1 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png new file mode 100644 index 000000000..965ec2014 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png new file mode 100644 index 000000000..965ec2014 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png new file mode 100644 index 000000000..3d0267ca3 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt.png new file mode 100644 index 000000000..7e77b9bed Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png new file mode 100644 index 000000000..ccb3c08e7 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png new file mode 100644 index 000000000..ccb3c08e7 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png new file mode 100644 index 000000000..d288ff81f Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt.png new file mode 100644 index 000000000..965ec2014 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png new file mode 100644 index 000000000..35726ff68 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png new file mode 100644 index 000000000..35726ff68 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png new file mode 100644 index 000000000..adf3d119d Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png new file mode 100644 index 000000000..adf3d119d Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png new file mode 100644 index 000000000..588f66037 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt.png new file mode 100644 index 000000000..1b5a86220 Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png new file mode 100644 index 000000000..c6000830a Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png new file mode 100644 index 000000000..d5705366e Binary files /dev/null and b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png deleted file mode 100644 index 7f6f672fa..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png b/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png deleted file mode 100644 index 5eaa5fce1..000000000 Binary files a/Mastodon/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png and /dev/null differ diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/Contents.json deleted file mode 100644 index 6e965652d..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/Contents.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "provides-namespace" : true - } -} diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/highlight.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/highlight.colorset/Contents.json deleted file mode 100644 index 2e1ce5f3a..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/AudioPlayer/highlight.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.851", - "green" : "0.565", - "red" : "0.169" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/Poll/highlight.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/Poll/highlight.colorset/Contents.json deleted file mode 100644 index 2e1ce5f3a..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/Poll/highlight.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.851", - "green" : "0.565", - "red" : "0.169" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Button/normal.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Button/normal.colorset/Contents.json deleted file mode 100644 index 869ed278a..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/Button/normal.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xD9", - "green" : "0x90", - "red" : "0x2B" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFF", - "green" : "0x84", - "red" : "0x0A" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Label/highlight.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Label/highlight.colorset/Contents.json deleted file mode 100644 index d853a71aa..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/Label/highlight.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "217", - "green" : "144", - "red" : "43" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Mastodon/Resources/Assets.xcassets/Colors/TextField/highlight.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/TextField/highlight.colorset/Contents.json deleted file mode 100644 index d853a71aa..000000000 --- a/Mastodon/Resources/Assets.xcassets/Colors/TextField/highlight.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "217", - "green" : "144", - "red" : "43" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Mastodon/Resources/ar.lproj/Localizable.strings b/Mastodon/Resources/ar.lproj/Localizable.strings index e6bb7b217..79f2a8897 100644 --- a/Mastodon/Resources/ar.lproj/Localizable.strings +++ b/Mastodon/Resources/ar.lproj/Localizable.strings @@ -56,22 +56,22 @@ Please check your internet connection."; "Common.Controls.Actions.TakePhoto" = "Take photo"; "Common.Controls.Actions.TryAgain" = "Try Again"; "Common.Controls.Actions.UnblockDomain" = "Unblock %@"; -"Common.Controls.Firendship.Block" = "Block"; -"Common.Controls.Firendship.BlockDomain" = "Block %@"; -"Common.Controls.Firendship.BlockUser" = "Block %@"; -"Common.Controls.Firendship.Blocked" = "Blocked"; -"Common.Controls.Firendship.EditInfo" = "Edit info"; -"Common.Controls.Firendship.Follow" = "Follow"; -"Common.Controls.Firendship.Following" = "Following"; -"Common.Controls.Firendship.Mute" = "Mute"; -"Common.Controls.Firendship.MuteUser" = "Mute %@"; -"Common.Controls.Firendship.Muted" = "Muted"; -"Common.Controls.Firendship.Pending" = "Pending"; -"Common.Controls.Firendship.Request" = "Request"; -"Common.Controls.Firendship.Unblock" = "Unblock"; -"Common.Controls.Firendship.UnblockUser" = "Unblock %@"; -"Common.Controls.Firendship.Unmute" = "Unmute"; -"Common.Controls.Firendship.UnmuteUser" = "Unmute %@"; +"Common.Controls.Friendship.Block" = "Block"; +"Common.Controls.Friendship.BlockDomain" = "Block %@"; +"Common.Controls.Friendship.BlockUser" = "Block %@"; +"Common.Controls.Friendship.Blocked" = "Blocked"; +"Common.Controls.Friendship.EditInfo" = "Edit Info"; +"Common.Controls.Friendship.Follow" = "Follow"; +"Common.Controls.Friendship.Following" = "Following"; +"Common.Controls.Friendship.Mute" = "Mute"; +"Common.Controls.Friendship.MuteUser" = "Mute %@"; +"Common.Controls.Friendship.Muted" = "Muted"; +"Common.Controls.Friendship.Pending" = "Pending"; +"Common.Controls.Friendship.Request" = "Request"; +"Common.Controls.Friendship.Unblock" = "Unblock"; +"Common.Controls.Friendship.UnblockUser" = "Unblock %@"; +"Common.Controls.Friendship.Unmute" = "Unmute"; +"Common.Controls.Friendship.UnmuteUser" = "Unmute %@"; "Common.Controls.Keyboard.Common.ComposeNewPost" = "Compose New Post"; "Common.Controls.Keyboard.Common.OpenSettings" = "Open Settings"; "Common.Controls.Keyboard.Common.ShowFavorites" = "Show Favorites"; @@ -277,7 +277,7 @@ tap the link to confirm your account."; "Scene.Search.Recommend.HashTag.Title" = "Trending in your timeline"; "Scene.Search.Searchbar.Cancel" = "Cancel"; "Scene.Search.Searchbar.Placeholder" = "Search hashtags and users"; -"Scene.Search.Searching.Clear" = "clear"; +"Scene.Search.Searching.Clear" = "Clear"; "Scene.Search.Searching.RecentSearch" = "Recent searches"; "Scene.Search.Searching.Segment.All" = "All"; "Scene.Search.Searching.Segment.Hashtags" = "Hashtags"; diff --git a/Mastodon/Resources/en.lproj/Localizable.strings b/Mastodon/Resources/en.lproj/Localizable.strings index e6bb7b217..79f2a8897 100644 --- a/Mastodon/Resources/en.lproj/Localizable.strings +++ b/Mastodon/Resources/en.lproj/Localizable.strings @@ -56,22 +56,22 @@ Please check your internet connection."; "Common.Controls.Actions.TakePhoto" = "Take photo"; "Common.Controls.Actions.TryAgain" = "Try Again"; "Common.Controls.Actions.UnblockDomain" = "Unblock %@"; -"Common.Controls.Firendship.Block" = "Block"; -"Common.Controls.Firendship.BlockDomain" = "Block %@"; -"Common.Controls.Firendship.BlockUser" = "Block %@"; -"Common.Controls.Firendship.Blocked" = "Blocked"; -"Common.Controls.Firendship.EditInfo" = "Edit info"; -"Common.Controls.Firendship.Follow" = "Follow"; -"Common.Controls.Firendship.Following" = "Following"; -"Common.Controls.Firendship.Mute" = "Mute"; -"Common.Controls.Firendship.MuteUser" = "Mute %@"; -"Common.Controls.Firendship.Muted" = "Muted"; -"Common.Controls.Firendship.Pending" = "Pending"; -"Common.Controls.Firendship.Request" = "Request"; -"Common.Controls.Firendship.Unblock" = "Unblock"; -"Common.Controls.Firendship.UnblockUser" = "Unblock %@"; -"Common.Controls.Firendship.Unmute" = "Unmute"; -"Common.Controls.Firendship.UnmuteUser" = "Unmute %@"; +"Common.Controls.Friendship.Block" = "Block"; +"Common.Controls.Friendship.BlockDomain" = "Block %@"; +"Common.Controls.Friendship.BlockUser" = "Block %@"; +"Common.Controls.Friendship.Blocked" = "Blocked"; +"Common.Controls.Friendship.EditInfo" = "Edit Info"; +"Common.Controls.Friendship.Follow" = "Follow"; +"Common.Controls.Friendship.Following" = "Following"; +"Common.Controls.Friendship.Mute" = "Mute"; +"Common.Controls.Friendship.MuteUser" = "Mute %@"; +"Common.Controls.Friendship.Muted" = "Muted"; +"Common.Controls.Friendship.Pending" = "Pending"; +"Common.Controls.Friendship.Request" = "Request"; +"Common.Controls.Friendship.Unblock" = "Unblock"; +"Common.Controls.Friendship.UnblockUser" = "Unblock %@"; +"Common.Controls.Friendship.Unmute" = "Unmute"; +"Common.Controls.Friendship.UnmuteUser" = "Unmute %@"; "Common.Controls.Keyboard.Common.ComposeNewPost" = "Compose New Post"; "Common.Controls.Keyboard.Common.OpenSettings" = "Open Settings"; "Common.Controls.Keyboard.Common.ShowFavorites" = "Show Favorites"; @@ -277,7 +277,7 @@ tap the link to confirm your account."; "Scene.Search.Recommend.HashTag.Title" = "Trending in your timeline"; "Scene.Search.Searchbar.Cancel" = "Cancel"; "Scene.Search.Searchbar.Placeholder" = "Search hashtags and users"; -"Scene.Search.Searching.Clear" = "clear"; +"Scene.Search.Searching.Clear" = "Clear"; "Scene.Search.Searching.RecentSearch" = "Recent searches"; "Scene.Search.Searching.Segment.All" = "All"; "Scene.Search.Searching.Segment.Hashtags" = "Hashtags"; diff --git a/Mastodon/Scene/Compose/AutoComplete/Cell/AutoCompleteTableViewCell.swift b/Mastodon/Scene/Compose/AutoComplete/Cell/AutoCompleteTableViewCell.swift index c9f0a55d1..a13e82f31 100644 --- a/Mastodon/Scene/Compose/AutoComplete/Cell/AutoCompleteTableViewCell.swift +++ b/Mastodon/Scene/Compose/AutoComplete/Cell/AutoCompleteTableViewCell.swift @@ -32,7 +32,7 @@ final class AutoCompleteTableViewCell: UITableViewCell { let titleLabel: UILabel = { let label = UILabel() label.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold), maximumPointSize: 22) - label.textColor = Asset.Colors.Label.highlight.color + label.textColor = Asset.Colors.brandBlue.color label.text = "Title" return label }() diff --git a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift index 8347f5641..4ef0dbe5a 100644 --- a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift +++ b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollExpiresOptionCollectionViewCell.swift @@ -23,7 +23,7 @@ final class ComposeStatusPollExpiresOptionCollectionViewCell: UICollectionViewCe button.titleLabel?.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 12)) button.expandEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: -20, right: -20) button.setTitle(L10n.Scene.Compose.Poll.durationTime(L10n.Scene.Compose.Poll.thirtyMinutes), for: .normal) - button.setTitleColor(Asset.Colors.Button.normal.color, for: .normal) + button.setTitleColor(Asset.Colors.brandBlue.color, for: .normal) return button }() diff --git a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift index dbe9ef4ad..4827c16f7 100644 --- a/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift +++ b/Mastodon/Scene/Compose/CollectionViewCell/ComposeStatusPollOptionAppendEntryCollectionViewCell.swift @@ -30,7 +30,7 @@ final class ComposeStatusPollOptionAppendEntryCollectionViewCell: UICollectionVi override var isHighlighted: Bool { didSet { pollOptionView.roundedBackgroundView.backgroundColor = isHighlighted ? Asset.Colors.Background.tertiarySystemBackground.color : Asset.Colors.Background.secondarySystemBackground.color - pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.Button.normal.color.withAlphaComponent(0.5) : Asset.Colors.Button.normal.color + pollOptionView.plusCircleImageView.tintColor = isHighlighted ? Asset.Colors.brandBlue.color.withAlphaComponent(0.5) : Asset.Colors.brandBlue.color } } diff --git a/Mastodon/Scene/Compose/ComposeViewController.swift b/Mastodon/Scene/Compose/ComposeViewController.swift index 0c1bf3a34..a9fe951f7 100644 --- a/Mastodon/Scene/Compose/ComposeViewController.swift +++ b/Mastodon/Scene/Compose/ComposeViewController.swift @@ -29,8 +29,8 @@ final class ComposeViewController: UIViewController, NeedsDependency { let button = RoundedEdgesButton(type: .custom) button.setTitle(L10n.Scene.Compose.composeAction, for: .normal) button.titleLabel?.font = .systemFont(ofSize: 14, weight: .bold) - button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.normal.color), for: .normal) - button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.normal.color.withAlphaComponent(0.5)), for: .highlighted) + button.setBackgroundImage(.placeholder(color: Asset.Colors.brandBlue.color), for: .normal) + button.setBackgroundImage(.placeholder(color: Asset.Colors.brandBlue.color.withAlphaComponent(0.5)), for: .highlighted) button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.disabled.color), for: .disabled) button.setTitleColor(.white, for: .normal) button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 16, bottom: 5, right: 16) // set 28pt height @@ -711,7 +711,7 @@ extension ComposeViewController: TextEditorViewTextAttributesDelegate { for match in highlightMatches { // set highlight var attributes = [NSAttributedString.Key: Any]() - attributes[.foregroundColor] = Asset.Colors.Label.highlight.color + attributes[.foregroundColor] = Asset.Colors.brandBlue.color // See `traitCollectionDidChange(_:)` // set accessibility @@ -780,7 +780,7 @@ extension ComposeViewController: TextEditorViewTextAttributesDelegate { // set highlight var attributes = [NSAttributedString.Key: Any]() - attributes[.foregroundColor] = Asset.Colors.Label.highlight.color + attributes[.foregroundColor] = Asset.Colors.brandBlue.color // See `traitCollectionDidChange(_:)` // set accessibility diff --git a/Mastodon/Scene/Compose/View/ComposeToolbarView.swift b/Mastodon/Scene/Compose/View/ComposeToolbarView.swift index d1ba5fdab..1dd19c552 100644 --- a/Mastodon/Scene/Compose/View/ComposeToolbarView.swift +++ b/Mastodon/Scene/Compose/View/ComposeToolbarView.swift @@ -225,7 +225,7 @@ extension ComposeToolbarView { extension ComposeToolbarView { private static func configureToolbarButtonAppearance(button: UIButton) { - button.tintColor = Asset.Colors.Button.normal.color + button.tintColor = Asset.Colors.brandBlue.color button.setBackgroundImage(.placeholder(size: ComposeToolbarView.toolbarButtonSize, color: .systemFill), for: .highlighted) button.layer.masksToBounds = true button.layer.cornerRadius = 5 diff --git a/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewController.swift b/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewController.swift index 7c7e8a274..eb7753337 100644 --- a/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewController.swift +++ b/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewController.swift @@ -117,10 +117,9 @@ extension HashtagTimelineViewController { aspectViewWillAppear(animated) viewModel.fetchTag() - guard viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial else { return } - - refreshControl.beginRefreshing() - refreshControl.sendActions(for: .valueChanged) + if viewModel.loadLatestStateMachine.currentState is HashtagTimelineViewModel.LoadLatestState.Initial { + viewModel.loadLatestStateMachine.enter(HashtagTimelineViewModel.LoadLatestState.Loading.self) + } } override func viewDidDisappear(_ animated: Bool) { diff --git a/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewModel+Diffable.swift b/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewModel+Diffable.swift index ed7b3a844..41b4d9210 100644 --- a/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/HashtagTimeline/HashtagTimelineViewModel+Diffable.swift @@ -31,6 +31,14 @@ extension HashtagTimelineViewModel { timelineMiddleLoaderTableViewCellDelegate: timelineMiddleLoaderTableViewCellDelegate, threadReplyLoaderTableViewCellDelegate: nil ) + + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.main]) + diffableDataSource?.apply(snapshot) + + // workaround to append loader wrong animation issue + snapshot.appendItems([.bottomLoader], toSection: .main) + diffableDataSource?.apply(snapshot) } } diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+DebugAction.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+DebugAction.swift index 2e2304ac3..19c3244c9 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+DebugAction.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+DebugAction.swift @@ -5,12 +5,12 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK && DEBUG + import os.log import UIKit import CoreData import CoreDataStack - -#if DEBUG import FLEX extension AsyncHomeTimelineViewController { @@ -25,10 +25,6 @@ extension AsyncHomeTimelineViewController { guard let self = self else { return } self.showFLEXAction(action) }), - UIAction(title: "Toggle Home", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] action in - guard let self = self else { return } - self.context.toggleHomePreference(action) - }), moveMenu, dropMenu, UIAction(title: "Show Welcome", image: UIImage(systemName: "figure.walk"), attributes: []) { [weak self] action in @@ -384,4 +380,5 @@ extension AsyncHomeTimelineViewController { .store(in: &disposeBag) } } + #endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+Provider.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+Provider.swift index c1533ce43..4896c58b9 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+Provider.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController+Provider.swift @@ -5,6 +5,8 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK + import os.log import UIKit import Combine @@ -111,3 +113,5 @@ extension AsyncHomeTimelineViewController: StatusProvider { } extension AsyncHomeTimelineViewController: UserProvider {} + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController.swift index 93a0436f5..247364801 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewController.swift @@ -5,6 +5,8 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK + import os.log import UIKit import AVKit @@ -56,16 +58,6 @@ final class AsyncHomeTimelineViewController: ASDKViewController, Ne }() var tableView: UITableView { node.view } - //let tableView: UITableView = { - // let tableView = ControlContainableTableView() - // tableView.register(StatusTableViewCell.self, forCellReuseIdentifier: String(describing: StatusTableViewCell.self)) - // tableView.register(TimelineMiddleLoaderTableViewCell.self, forCellReuseIdentifier: String(describing: TimelineMiddleLoaderTableViewCell.self)) - // tableView.register(TimelineBottomLoaderTableViewCell.self, forCellReuseIdentifier: String(describing: TimelineBottomLoaderTableViewCell.self)) - // tableView.rowHeight = UITableView.automaticDimension - // tableView.separatorStyle = .none - // tableView.backgroundColor = .clear - // return tableView - //}() let publishProgressView: UIProgressView = { let progressView = UIProgressView(progressViewStyle: .bar) @@ -116,25 +108,10 @@ extension AsyncHomeTimelineViewController { // long press to trigger debug menu settingBarButtonItem.menu = debugMenu PerformanceMonitor.shared().delegate = self - #else settingBarButtonItem.target = self settingBarButtonItem.action = #selector(AsyncHomeTimelineViewController.settingBarButtonItemPressed(_:)) #endif - settingBarButtonItem.menu = UIMenu(title: "Toggle Home", image: nil, identifier: nil, options: [], children: [ - UIAction(title: "Setting", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] _ in - guard let self = self else { return } - self.settingBarButtonItemPressed(self.settingBarButtonItem) - }), - UIAction(title: "Toggle Home", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] action in - guard let self = self else { return } - self.context.toggleHomePreference(action) - let alertController = UIAlertController(title: "Please Restart App", message: nil, preferredStyle: .alert) - let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) - alertController.addAction(okAction) - self.coordinator.present(scene: .alertController(alertController: alertController), from: nil, transition: .alertController(animated: true, completion: nil)) - }) - ]) navigationItem.rightBarButtonItem = composeBarButtonItem composeBarButtonItem.target = self @@ -604,3 +581,5 @@ extension AsyncHomeTimelineViewController: ASTableDelegate { // MARK: - StatusNodeDelegate extension AsyncHomeTimelineViewController: StatusNodeDelegate { } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+Diffable.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+Diffable.swift index 90d5d9f46..fbd5c1438 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+Diffable.swift @@ -5,6 +5,8 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK + import os.log import UIKit import CoreData @@ -153,3 +155,5 @@ extension AsyncHomeTimelineViewModel: NSFetchedResultsControllerDelegate { } } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadLatestState.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadLatestState.swift index 4f3aaadc3..4d73eae5a 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadLatestState.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadLatestState.swift @@ -6,6 +6,8 @@ // // +#if ASDK + import os.log import func QuartzCore.CACurrentMediaTime import Foundation @@ -128,3 +130,5 @@ extension AsyncHomeTimelineViewModel.LoadLatestState { } } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadMiddleState.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadMiddleState.swift index e25f60ca9..f568a6aaa 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadMiddleState.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadMiddleState.swift @@ -5,6 +5,8 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK + import os.log import Foundation import GameplayKit @@ -106,3 +108,5 @@ extension AsyncHomeTimelineViewModel.LoadMiddleState { } } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadOldestState.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadOldestState.swift index 8a58cd722..5743ab292 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadOldestState.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel+LoadOldestState.swift @@ -5,6 +5,8 @@ // Created by MainasuK Cirno on 2021-6-21. // +#if ASDK + import os.log import Foundation import GameplayKit @@ -111,3 +113,5 @@ extension AsyncHomeTimelineViewModel.LoadOldestState { } } } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel.swift b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel.swift index 3b5013a8c..c33b91c02 100644 --- a/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel.swift +++ b/Mastodon/Scene/HomeTimeline/AsyncHomeTimeline/AsyncHomeTimelineViewModel.swift @@ -6,6 +6,8 @@ // // +#if ASDK + import os.log import func AVFoundation.AVMakeRect import UIKit @@ -146,3 +148,5 @@ final class AsyncHomeTimelineViewModel: NSObject { } extension AsyncHomeTimelineViewModel: SuggestionAccountViewModelDelegate { } + +#endif diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift index 588f90aeb..69eff4a82 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift @@ -25,10 +25,6 @@ extension HomeTimelineViewController { guard let self = self else { return } self.showFLEXAction(action) }), - UIAction(title: "Toggle Home", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] action in - guard let self = self else { return } - self.context.toggleHomePreference(action) - }), moveMenu, dropMenu, UIAction(title: "Show Welcome", image: UIImage(systemName: "figure.walk"), attributes: []) { [weak self] action in diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift index e6417f06c..8f1558554 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController.swift @@ -15,10 +15,6 @@ import GameplayKit import MastodonSDK import AlamofireImage -#if DEBUG -import GDPerformanceView_Swift -#endif - final class HomeTimelineViewController: UIViewController, NeedsDependency, MediaPreviewableViewController { weak var context: AppContext! { willSet { precondition(!isViewLoaded) } } @@ -102,22 +98,6 @@ extension HomeTimelineViewController { #if DEBUG // long press to trigger debug menu settingBarButtonItem.menu = debugMenu - PerformanceMonitor.shared().delegate = self - #elseif ASDK - settingBarButtonItem.menu = UIMenu(title: "Toggle Home", image: nil, identifier: nil, options: [], children: [ - UIAction(title: "Setting", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] _ in - guard let self = self else { return } - self.settingBarButtonItemPressed(self.settingBarButtonItem) - }), - UIAction(title: "Show Async Home", image: nil, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] action in - guard let self = self else { return } - self.context.toggleHomePreference(action) - let alertController = UIAlertController(title: "Please Restart App", message: nil, preferredStyle: .alert) - let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) - alertController.addAction(okAction) - self.coordinator.present(scene: .alertController(alertController: alertController), from: nil, transition: .alertController(animated: true, completion: nil)) - }) - ]) #else settingBarButtonItem.target = self settingBarButtonItem.action = #selector(HomeTimelineViewController.settingBarButtonItemPressed(_:)) @@ -578,11 +558,3 @@ extension HomeTimelineViewController: StatusTableViewControllerNavigateable { statusKeyCommandHandler(sender) } } - -#if DEBUG -extension HomeTimelineViewController: PerformanceMonitorDelegate { - func performanceMonitor(didReport performanceReport: PerformanceReport) { - // print(performanceReport) - } -} -#endif diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift index 6f5e66c0e..d83a8bfb8 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewModel+Diffable.swift @@ -33,9 +33,13 @@ extension HomeTimelineViewModel { threadReplyLoaderTableViewCellDelegate: nil ) -// var snapshot = NSDiffableDataSourceSnapshot() -// snapshot.appendSections([.main]) -// diffableDataSource?.apply(snapshot) + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.main]) + diffableDataSource?.apply(snapshot) + + // workaround to append loader wrong animation issue + snapshot.appendItems([.bottomLoader], toSection: .main) + diffableDataSource?.apply(snapshot) } } diff --git a/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift b/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift index ac39ce1ae..84a463671 100644 --- a/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift +++ b/Mastodon/Scene/HomeTimeline/View/HomeTimelineNavigationBarTitleView.swift @@ -106,7 +106,7 @@ extension HomeTimelineNavigationBarTitleView { configureButton( title: L10n.Scene.HomeTimeline.NavigationBarState.newPosts, textColor: .white, - backgroundColor: Asset.Colors.Button.normal.color + backgroundColor: Asset.Colors.brandBlue.color ) button.isHidden = false case .offlineButton: diff --git a/Mastodon/Scene/MainTab/MainTabBarController.swift b/Mastodon/Scene/MainTab/MainTabBarController.swift index e16ebc202..50c3d0b6c 100644 --- a/Mastodon/Scene/MainTab/MainTabBarController.swift +++ b/Mastodon/Scene/MainTab/MainTabBarController.swift @@ -10,6 +10,10 @@ import UIKit import Combine import SafariServices +#if DEBUG +import GDPerformanceView_Swift +#endif + class MainTabBarController: UITabBarController { var disposeBag = Set() @@ -185,6 +189,14 @@ extension MainTabBarController { } .store(in: &disposeBag) } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + #if DEBUG + PerformanceMonitor.shared().start() + #endif + } } @@ -345,3 +357,33 @@ extension MainTabBarController { } } + +#if ASDK +extension MainTabBarController { + override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { + guard let event = event else { return } + switch event.subtype { + case .motionShake: + let alertController = UIAlertController(title: "ASDK Debug Panel", message: nil, preferredStyle: .alert) + let toggleHomeAction = UIAlertAction(title: "Toggle Home", style: .default) { [weak self] _ in + guard let self = self else { return } + MainTabBarController.toggleAsyncHome() + let okAlertController = UIAlertController(title: "Success", message: "Please restart the app", preferredStyle: .alert) + let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) + okAlertController.addAction(okAction) + self.coordinator.present(scene: .alertController(alertController: okAlertController), from: nil, transition: .alertController(animated: true, completion: nil)) + } + alertController.addAction(toggleHomeAction) + let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) + alertController.addAction(cancelAction) + self.coordinator.present(scene: .alertController(alertController: alertController), from: nil, transition: .alertController(animated: true, completion: nil)) + default: + break + } + } + + static func toggleAsyncHome() { + UserDefaults.shared.preferAsyncHomeTimeline.toggle() + } +} +#endif diff --git a/Mastodon/Scene/Notification/NotificationViewController.swift b/Mastodon/Scene/Notification/NotificationViewController.swift index 47fee4d66..322f804af 100644 --- a/Mastodon/Scene/Notification/NotificationViewController.swift +++ b/Mastodon/Scene/Notification/NotificationViewController.swift @@ -18,6 +18,8 @@ final class NotificationViewController: UIViewController, NeedsDependency { weak var coordinator: SceneCoordinator! { willSet { precondition(!isViewLoaded) } } var disposeBag = Set() + var observations = Set() + private(set) lazy var viewModel = NotificationViewModel(context: context) let segmentControl: UISegmentedControl = { @@ -48,8 +50,13 @@ extension NotificationViewController { super.viewDidLoad() view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color + segmentControl.translatesAutoresizingMaskIntoConstraints = false navigationItem.titleView = segmentControl + NSLayoutConstraint.activate([ + segmentControl.widthAnchor.constraint(equalToConstant: 287) + ]) segmentControl.addTarget(self, action: #selector(NotificationViewController.segmentedControlValueChanged(_:)), for: .valueChanged) + tableView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(tableView) NSLayoutConstraint.activate([ @@ -81,6 +88,17 @@ extension NotificationViewController { } } .store(in: &disposeBag) + + viewModel.dataSourceDidUpdated + .receive(on: RunLoop.main) + .sink { [weak self] in + guard let self = self else { return } + self.viewModel.needsScrollToTopAfterDataSourceUpdate = false + DispatchQueue.main.asyncAfter(deadline: .now() + 0.33) { + self.scrollToTop(animated: true) + } + } + .store(in: &disposeBag) viewModel.selectedIndex .removeDuplicates() @@ -92,6 +110,9 @@ extension NotificationViewController { guard let domain = self.viewModel.activeMastodonAuthenticationBox.value?.domain, let userID = self.viewModel.activeMastodonAuthenticationBox.value?.userID else { return } + + self.viewModel.needsScrollToTopAfterDataSourceUpdate = true + switch segment { case .EveryThing: self.viewModel.notificationPredicate.value = MastodonNotification.predicate(domain: domain, userID: userID) @@ -100,6 +121,15 @@ extension NotificationViewController { } } .store(in: &disposeBag) + + segmentControl.observe(\.selectedSegmentIndex, options: [.new]) { [weak self] segmentControl, _ in + guard let self = self else { return } + // scroll to top when select same segment + if segmentControl.selectedSegmentIndex == self.viewModel.selectedIndex.value.rawValue { + self.scrollToTop(animated: true) + } + } + .store(in: &observations) } override func viewWillAppear(_ animated: Bool) { @@ -277,6 +307,18 @@ extension NotificationViewController { } } +// MARK: - ScrollViewContainer +extension NotificationViewController: ScrollViewContainer { + + var scrollView: UIScrollView { tableView } + + func scrollToTop(animated: Bool) { + let indexPath = IndexPath(row: 0, section: 0) + guard viewModel.diffableDataSource?.itemIdentifier(for: indexPath) != nil else { return } + tableView.scrollToRow(at: indexPath, at: .top, animated: true) + } +} + extension NotificationViewController: LoadMoreConfigurableTableViewContainer { typealias BottomLoaderTableViewCell = TimelineBottomLoaderTableViewCell typealias LoadingState = NotificationViewModel.LoadOldestState.Loading diff --git a/Mastodon/Scene/Notification/NotificationViewModel+diffable.swift b/Mastodon/Scene/Notification/NotificationViewModel+Diffable.swift similarity index 63% rename from Mastodon/Scene/Notification/NotificationViewModel+diffable.swift rename to Mastodon/Scene/Notification/NotificationViewModel+Diffable.swift index 4e0d9b6d9..b8c70f3b1 100644 --- a/Mastodon/Scene/Notification/NotificationViewModel+diffable.swift +++ b/Mastodon/Scene/Notification/NotificationViewModel+Diffable.swift @@ -1,5 +1,5 @@ // -// NotificationViewModel+diffable.swift +// NotificationViewModel+Diffable.swift // Mastodon // // Created by sxiaojian on 2021/4/13. @@ -29,6 +29,14 @@ extension NotificationViewModel { delegate: delegate, dependency: dependency ) + + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.main]) + diffableDataSource.apply(snapshot) + + // workaround to append loader wrong animation issue + snapshot.appendItems([.bottomLoader], toSection: .main) + diffableDataSource.apply(snapshot) } } @@ -87,55 +95,15 @@ extension NotificationViewModel: NSFetchedResultsControllerDelegate { if !notifications.isEmpty, self.noMoreNotification.value == false { newSnapshot.appendItems([.bottomLoader], toSection: .main) } - guard let difference = self.calculateReloadSnapshotDifference(navigationBar: navigationBar, tableView: tableView, oldSnapshot: oldSnapshot, newSnapshot: newSnapshot) else { - diffableDataSource.apply(newSnapshot, animatingDifferences: false) - self.isFetchingLatestNotification.value = false - tableView.reloadData() - return - } - - diffableDataSource.apply(newSnapshot, animatingDifferences: false) { - tableView.scrollToRow(at: difference.targetIndexPath, at: .top, animated: false) - tableView.contentOffset.y = tableView.contentOffset.y - difference.offset - self.isFetchingLatestNotification.value = false + + self.isFetchingLatestNotification.value = false + + diffableDataSource.apply(newSnapshot, animatingDifferences: false) { [weak self] in + guard let self = self else { return } + self.dataSourceDidUpdated.send() } } } } - - private struct Difference { - let item: T - let sourceIndexPath: IndexPath - let targetIndexPath: IndexPath - let offset: CGFloat - } - - private func calculateReloadSnapshotDifference( - navigationBar: UINavigationBar, - tableView: UITableView, - oldSnapshot: NSDiffableDataSourceSnapshot, - newSnapshot: NSDiffableDataSourceSnapshot - ) -> Difference? { - guard oldSnapshot.numberOfItems != 0 else { return nil } - - // old snapshot not empty. set source index path to first item if not match - let sourceIndexPath = UIViewController.topVisibleTableViewCellIndexPath(in: tableView, navigationBar: navigationBar) ?? IndexPath(row: 0, section: 0) - - guard sourceIndexPath.row < oldSnapshot.itemIdentifiers(inSection: .main).count else { return nil } - - if oldSnapshot.itemIdentifiers.elementsEqual(newSnapshot.itemIdentifiers) { - return nil - } - let timelineItem = oldSnapshot.itemIdentifiers(inSection: .main)[sourceIndexPath.row] - guard let itemIndex = newSnapshot.itemIdentifiers(inSection: .main).firstIndex(of: timelineItem) else { return nil } - let targetIndexPath = IndexPath(row: itemIndex, section: 0) - - let offset = UIViewController.tableViewCellOriginOffsetToWindowTop(in: tableView, at: sourceIndexPath, navigationBar: navigationBar) - return Difference( - item: timelineItem, - sourceIndexPath: sourceIndexPath, - targetIndexPath: targetIndexPath, - offset: offset - ) - } + } diff --git a/Mastodon/Scene/Notification/NotificationViewModel.swift b/Mastodon/Scene/Notification/NotificationViewModel.swift index f535c5598..4947dbbd0 100644 --- a/Mastodon/Scene/Notification/NotificationViewModel.swift +++ b/Mastodon/Scene/Notification/NotificationViewModel.swift @@ -31,10 +31,13 @@ final class NotificationViewModel: NSObject { let notificationPredicate = CurrentValueSubject(nil) let cellFrameCache = NSCache() + var needsScrollToTopAfterDataSourceUpdate = false + let dataSourceDidUpdated = PassthroughSubject() let isFetchingLatestNotification = CurrentValueSubject(false) // output var diffableDataSource: UITableViewDiffableDataSource! + // top loader private(set) lazy var loadLatestStateMachine: GKStateMachine = { // exclude timeline middle fetcher state diff --git a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift index ebd9b6ead..955f70a0f 100644 --- a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift +++ b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift @@ -713,7 +713,7 @@ extension MastodonRegisterViewController: UITextFieldDelegate { private func setTextFieldValidAppearance(_ textField: UITextField, validateState: MastodonRegisterViewModel.ValidateState) { switch validateState { case .empty: - showShadowWithColor(color: textField.isFirstResponder ? Asset.Colors.TextField.highlight.color : .clear, textField: textField) + showShadowWithColor(color: textField.isFirstResponder ? Asset.Colors.brandBlue.color : .clear, textField: textField) case .valid: showShadowWithColor(color: Asset.Colors.TextField.valid.color, textField: textField) case .invalid: diff --git a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift index 8b238cf0f..fda790913 100644 --- a/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift +++ b/Mastodon/Scene/Onboarding/ServerRules/MastodonServerRulesViewController.swift @@ -175,15 +175,19 @@ extension MastodonServerRulesViewController { } func configTextView() { - let linkColor = Asset.Colors.Button.normal.color - let str = NSString(string: L10n.Scene.ServerRules.prompt(viewModel.domain)) let termsOfServiceRange = str.range(of: L10n.Scene.ServerRules.termsOfService) let privacyRange = str.range(of: L10n.Scene.ServerRules.privacyPolicy) - let attributeString = NSMutableAttributedString(string: L10n.Scene.ServerRules.prompt(viewModel.domain), attributes: [NSAttributedString.Key.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22), NSAttributedString.Key.foregroundColor: UIColor.label]) + let attributeString = NSMutableAttributedString( + string: L10n.Scene.ServerRules.prompt(viewModel.domain), + attributes: [ + NSAttributedString.Key.font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular), maximumPointSize: 22), + NSAttributedString.Key.foregroundColor: UIColor.label + ] + ) attributeString.addAttribute(.link, value: Mastodon.API.serverRulesURL(domain: viewModel.domain), range: termsOfServiceRange) attributeString.addAttribute(.link, value: Mastodon.API.privacyURL(domain: viewModel.domain), range: privacyRange) - let linkAttributes = [NSAttributedString.Key.foregroundColor:linkColor] + let linkAttributes = [NSAttributedString.Key.foregroundColor: Asset.Colors.brandBlue.color] bottomPromptTextView.attributedText = attributeString bottomPromptTextView.linkTextAttributes = linkAttributes bottomPromptTextView.delegate = self diff --git a/Mastodon/Scene/Onboarding/Welcome/WelcomeViewController.swift b/Mastodon/Scene/Onboarding/Welcome/WelcomeViewController.swift index dea4de017..3ee2a4b07 100644 --- a/Mastodon/Scene/Onboarding/Welcome/WelcomeViewController.swift +++ b/Mastodon/Scene/Onboarding/Welcome/WelcomeViewController.swift @@ -41,7 +41,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency { let backgroundImageHighlightedColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor(white: 0.8, alpha: 1.0) : Asset.Colors.brandBlueDarken20.color button.setBackgroundImage(.placeholder(color: backgroundImageColor), for: .normal) button.setBackgroundImage(.placeholder(color: backgroundImageHighlightedColor), for: .highlighted) - let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? Asset.Colors.Button.normal.color : UIColor.white + let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? Asset.Colors.brandBlue.color : UIColor.white button.setTitleColor(titleColor, for: .normal) button.translatesAutoresizingMaskIntoConstraints = false return button @@ -51,7 +51,7 @@ final class WelcomeViewController: UIViewController, NeedsDependency { let button = UIButton(type: .system) button.titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 15, weight: .semibold)) button.setTitle(L10n.Common.Controls.Actions.signIn, for: .normal) - let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor.white.withAlphaComponent(0.8) : Asset.Colors.Button.normal.color + let titleColor: UIColor = traitCollection.userInterfaceIdiom == .phone ? UIColor.white.withAlphaComponent(0.8) : Asset.Colors.brandBlue.color button.setTitleColor(titleColor, for: .normal) button.translatesAutoresizingMaskIntoConstraints = false return button diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift index 199903792..2088df72f 100644 --- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift +++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift @@ -220,6 +220,9 @@ extension ProfileHeaderViewController { super.viewDidAppear(animated) viewModel.viewDidAppear.value = true + + // set display after view appear + profileHeaderView.setupAvatarOverlayViews() } override func viewDidLayoutSubviews() { diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift index d0a29762c..0c728788d 100644 --- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift +++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift @@ -144,7 +144,7 @@ extension ProfileHeaderViewModel { return html?.text } - // check if profile chagned or not + // check if profile change or not func isProfileInfoEdited() -> Bool { guard isEditing.value else { return false } diff --git a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift index 54c57139d..e289cb493 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileHeaderView.swift @@ -73,10 +73,15 @@ final class ProfileHeaderView: UIView { imageView.image = placeholderImage return imageView }() + + func setupAvatarOverlayViews() { + editAvatarBackgroundView.backgroundColor = UIColor.black.withAlphaComponent(0.6) + editAvatarButton.tintColor = .white + } let editAvatarBackgroundView: UIView = { let view = UIView() - view.backgroundColor = UIColor.black.withAlphaComponent(0.6) + view.backgroundColor = .clear // set value after view appeared view.layer.masksToBounds = true view.layer.cornerCurve = .continuous view.layer.cornerRadius = ProfileHeaderView.avatarImageViewCornerRadius @@ -87,7 +92,7 @@ final class ProfileHeaderView: UIView { let editAvatarButton: HighlightDimmableButton = { let button = HighlightDimmableButton() button.setImage(UIImage(systemName: "photo", withConfiguration: UIImage.SymbolConfiguration(pointSize: 28)), for: .normal) - button.tintColor = .white + button.tintColor = .clear return button }() diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index 267e5bcee..8ba7851cd 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -58,7 +58,7 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi let refreshControl: UIRefreshControl = { let refreshControl = UIRefreshControl() - refreshControl.tintColor = .label + refreshControl.tintColor = .white return refreshControl }() @@ -813,7 +813,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { switch relationshipAction { case .none: break - case .follow, .reqeust, .pending, .following: + case .follow, .request, .pending, .following: UserProviderFacade.toggleUserFollowRelationship(provider: self) .sink { _ in // TODO: handle error @@ -829,7 +829,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.message(name), preferredStyle: .alert ) - let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unmute, style: .default) { [weak self] _ in + let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unmute, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserMuteRelationship(provider: self, cell: nil) .sink { _ in @@ -851,7 +851,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate { message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnblockUsre.message(name), preferredStyle: .alert ) - let unblockAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unblock, style: .default) { [weak self] _ in + let unblockAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unblock, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserBlockRelationship(provider: self, cell: nil) .sink { _ in diff --git a/Mastodon/Scene/Profile/ProfileViewModel.swift b/Mastodon/Scene/Profile/ProfileViewModel.swift index f9a89909c..619d55ba3 100644 --- a/Mastodon/Scene/Profile/ProfileViewModel.swift +++ b/Mastodon/Scene/Profile/ProfileViewModel.swift @@ -327,7 +327,7 @@ extension ProfileViewModel { enum RelationshipAction: Int, CaseIterable { case none // set hide from UI case follow - case reqeust + case request case pending case following case muting @@ -349,7 +349,7 @@ extension ProfileViewModel { static let none = RelationshipAction.none.option static let follow = RelationshipAction.follow.option - static let request = RelationshipAction.reqeust.option + static let request = RelationshipAction.request.option static let pending = RelationshipAction.pending.option static let following = RelationshipAction.following.option static let muting = RelationshipAction.muting.option @@ -378,15 +378,15 @@ extension ProfileViewModel { } switch highPriorityAction { case .none: return " " - case .follow: return L10n.Common.Controls.Firendship.follow - case .reqeust: return L10n.Common.Controls.Firendship.request - case .pending: return L10n.Common.Controls.Firendship.pending - case .following: return L10n.Common.Controls.Firendship.following - case .muting: return L10n.Common.Controls.Firendship.muted - case .blocked: return L10n.Common.Controls.Firendship.follow // blocked by user - case .blocking: return L10n.Common.Controls.Firendship.blocked - case .suspended: return L10n.Common.Controls.Firendship.follow - case .edit: return L10n.Common.Controls.Firendship.editInfo + case .follow: return L10n.Common.Controls.Friendship.follow + case .request: return L10n.Common.Controls.Friendship.request + case .pending: return L10n.Common.Controls.Friendship.pending + case .following: return L10n.Common.Controls.Friendship.following + case .muting: return L10n.Common.Controls.Friendship.muted + case .blocked: return L10n.Common.Controls.Friendship.follow // blocked by user + case .blocking: return L10n.Common.Controls.Friendship.blocked + case .suspended: return L10n.Common.Controls.Friendship.follow + case .edit: return L10n.Common.Controls.Friendship.editInfo case .editing: return L10n.Common.Controls.Actions.done case .updating: return " " } @@ -395,21 +395,21 @@ extension ProfileViewModel { var backgroundColor: UIColor { guard let highPriorityAction = self.highPriorityAction(except: []) else { assertionFailure() - return Asset.Colors.Button.normal.color + return Asset.Colors.brandBlue.color } switch highPriorityAction { - case .none: return Asset.Colors.Button.normal.color - case .follow: return Asset.Colors.Button.normal.color - case .reqeust: return Asset.Colors.Button.normal.color - case .pending: return Asset.Colors.Button.normal.color - case .following: return Asset.Colors.Button.normal.color + case .none: return Asset.Colors.brandBlue.color + case .follow: return Asset.Colors.brandBlue.color + case .request: return Asset.Colors.brandBlue.color + case .pending: return Asset.Colors.brandBlue.color + case .following: return Asset.Colors.brandBlue.color case .muting: return Asset.Colors.Background.alertYellow.color - case .blocked: return Asset.Colors.Button.normal.color + case .blocked: return Asset.Colors.brandBlue.color case .blocking: return Asset.Colors.Background.danger.color - case .suspended: return Asset.Colors.Button.normal.color - case .edit: return Asset.Colors.Button.normal.color - case .editing: return Asset.Colors.Button.normal.color - case .updating: return Asset.Colors.Button.normal.color + case .suspended: return Asset.Colors.brandBlue.color + case .edit: return Asset.Colors.brandBlue.color + case .editing: return Asset.Colors.brandBlue.color + case .updating: return Asset.Colors.brandBlue.color } } diff --git a/Mastodon/Scene/Profile/Timeline/UserTimelineViewModel+Diffable.swift b/Mastodon/Scene/Profile/Timeline/UserTimelineViewModel+Diffable.swift index 7e4ec8728..276c3566f 100644 --- a/Mastodon/Scene/Profile/Timeline/UserTimelineViewModel+Diffable.swift +++ b/Mastodon/Scene/Profile/Timeline/UserTimelineViewModel+Diffable.swift @@ -32,6 +32,9 @@ extension UserTimelineViewModel { // set empty section to make update animation top-to-bottom style var snapshot = NSDiffableDataSourceSnapshot() snapshot.appendSections([.main]) + diffableDataSource?.apply(snapshot) + + // workaround to append loader wrong animation issue snapshot.appendItems([.bottomLoader], toSection: .main) diffableDataSource?.apply(snapshot) } diff --git a/Mastodon/Scene/Report/ReportViewController.swift b/Mastodon/Scene/Report/ReportViewController.swift index b0c6ddcc9..7143912d5 100644 --- a/Mastodon/Scene/Report/ReportViewController.swift +++ b/Mastodon/Scene/Report/ReportViewController.swift @@ -222,10 +222,16 @@ class ReportViewController: UIViewController, NeedsDependency { let padding = contentFrame.maxY - endFrame.minY guard padding > 0 else { self.bottomConstraint.constant = 0.0 + UIView.animate(withDuration: 0.33) { + self.view.layoutIfNeeded() + } return } self.bottomConstraint.constant = padding + UIView.animate(withDuration: 0.33) { + self.view.layoutIfNeeded() + } }) .store(in: &disposeBag) } @@ -235,7 +241,7 @@ class ReportViewController: UIViewController, NeedsDependency { = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.cancel, target: self, action: #selector(doneButtonDidClick)) - navigationItem.rightBarButtonItem?.tintColor = Asset.Colors.Label.highlight.color + navigationItem.rightBarButtonItem?.tintColor = Asset.Colors.brandBlue.color // fetch old mastodon user let beReportedUser: MastodonUser? = { diff --git a/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift b/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift index b1d0af6b0..95198312f 100644 --- a/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift +++ b/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift @@ -76,7 +76,7 @@ final class ReportedStatusTableViewCell: UITableViewCell, StatusCell { super.setHighlighted(highlighted, animated: animated) if highlighted { checkbox.image = UIImage(systemName: "checkmark.circle.fill") - checkbox.tintColor = Asset.Colors.Label.highlight.color + checkbox.tintColor = Asset.Colors.brandBlue.color } else if !isSelected { checkbox.image = UIImage(systemName: "circle") checkbox.tintColor = Asset.Colors.Label.secondary.color diff --git a/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendAccountsCollectionViewCell.swift b/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendAccountsCollectionViewCell.swift index 289583aec..d76cb24bd 100644 --- a/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendAccountsCollectionViewCell.swift +++ b/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendAccountsCollectionViewCell.swift @@ -90,6 +90,13 @@ class SearchRecommendAccountsCollectionViewCell: UICollectionViewCell { super.init(coder: coder) configure() } + + override var isHighlighted: Bool { + didSet { + contentView.alpha = isHighlighted ? 0.8 : 1.0 + } + } + } extension SearchRecommendAccountsCollectionViewCell { diff --git a/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendTagsCollectionViewCell.swift b/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendTagsCollectionViewCell.swift index 002929510..e555e1fac 100644 --- a/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendTagsCollectionViewCell.swift +++ b/Mastodon/Scene/Search/CollectionViewCell/SearchRecommendTagsCollectionViewCell.swift @@ -51,6 +51,12 @@ class SearchRecommendTagsCollectionViewCell: UICollectionViewCell { super.init(coder: coder) configure() } + + override var isHighlighted: Bool { + didSet { + backgroundColor = isHighlighted ? Asset.Colors.brandBlueDarken20.color : Asset.Colors.brandBlue.color + } + } } extension SearchRecommendTagsCollectionViewCell { @@ -106,7 +112,7 @@ extension SearchRecommendTagsCollectionViewCell { flameIconView.translatesAutoresizingMaskIntoConstraints = false horizontalStackView.addArrangedSubview(flameIconView) - + flameIconView.setContentHuggingPriority(.required - 1, for: .horizontal) containerStackView.addArrangedSubview(horizontalStackView) peopleLabel.translatesAutoresizingMaskIntoConstraints = false diff --git a/Mastodon/Scene/Search/SearchViewController+Follow.swift b/Mastodon/Scene/Search/SearchViewController+Follow.swift index a7f7faf90..c31f6d82a 100644 --- a/Mastodon/Scene/Search/SearchViewController+Follow.swift +++ b/Mastodon/Scene/Search/SearchViewController+Follow.swift @@ -52,7 +52,7 @@ extension SearchViewController: SearchRecommendAccountsCollectionViewCellDelegat message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.message(name), preferredStyle: .alert ) - let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unmute, style: .default) { [weak self] _ in + let unmuteAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unmute, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserMuteRelationship(provider: self, cell: nil) .sink { _ in @@ -74,7 +74,7 @@ extension SearchViewController: SearchRecommendAccountsCollectionViewCellDelegat message: L10n.Scene.Profile.RelationshipActionAlert.ConfirmUnblockUsre.message(name), preferredStyle: .alert ) - let unblockAction = UIAlertAction(title: L10n.Common.Controls.Firendship.unblock, style: .default) { [weak self] _ in + let unblockAction = UIAlertAction(title: L10n.Common.Controls.Friendship.unblock, style: .default) { [weak self] _ in guard let self = self else { return } UserProviderFacade.toggleUserBlockRelationship(provider: self, cell: nil) .sink { _ in diff --git a/Mastodon/Scene/Search/SearchViewController+Searching.swift b/Mastodon/Scene/Search/SearchViewController+Searching.swift index 0602ac200..8319781c4 100644 --- a/Mastodon/Scene/Search/SearchViewController+Searching.swift +++ b/Mastodon/Scene/Search/SearchViewController+Searching.swift @@ -29,6 +29,7 @@ extension SearchViewController { searchingTableView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), ]) searchingTableView.tableFooterView = UIView() + searchingTableView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color viewModel.isSearching .receive(on: DispatchQueue.main) .sink { [weak self] isSearching in diff --git a/Mastodon/Scene/Search/TableViewCell/SearchingTableViewCell.swift b/Mastodon/Scene/Search/TableViewCell/SearchingTableViewCell.swift index a3a7b58ac..d0e06ba18 100644 --- a/Mastodon/Scene/Search/TableViewCell/SearchingTableViewCell.swift +++ b/Mastodon/Scene/Search/TableViewCell/SearchingTableViewCell.swift @@ -54,7 +54,7 @@ final class SearchingTableViewCell: UITableViewCell { extension SearchingTableViewCell { private func configure() { - backgroundColor = .clear + backgroundColor = Asset.Colors.Background.systemBackground.color let containerStackView = UIStackView() containerStackView.axis = .horizontal @@ -115,11 +115,11 @@ extension SearchingTableViewCell { let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate) _imageView.image = image _titleLabel.text = "# " + tag.name - guard let historys = tag.history else { + guard let histories = tag.history else { _subTitleLabel.text = "" return } - let recentHistory = historys.prefix(2) + let recentHistory = histories.prefix(2) let peopleAreTalking = recentHistory.compactMap { Int($0.accounts) }.reduce(0, +) let string = L10n.Scene.Search.Recommend.HashTag.peopleTalking(String(peopleAreTalking)) _subTitleLabel.text = string @@ -129,13 +129,13 @@ extension SearchingTableViewCell { let image = UIImage(systemName: "number.circle.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 34, weight: .regular))!.withRenderingMode(.alwaysTemplate) _imageView.image = image _titleLabel.text = "# " + tag.name - guard let historys = tag.histories?.sorted(by: { + guard let histories = tag.histories?.sorted(by: { $0.createAt.compare($1.createAt) == .orderedAscending }) else { _subTitleLabel.text = "" return } - let recentHistory = historys.prefix(2) + let recentHistory = histories.prefix(2) let peopleAreTalking = recentHistory.compactMap { Int($0.accounts) }.reduce(0, +) let string = L10n.Scene.Search.Recommend.HashTag.peopleTalking(String(peopleAreTalking)) _subTitleLabel.text = string diff --git a/Mastodon/Scene/Settings/SettingsViewController.swift b/Mastodon/Scene/Settings/SettingsViewController.swift index 077058466..e7be49b33 100644 --- a/Mastodon/Scene/Settings/SettingsViewController.swift +++ b/Mastodon/Scene/Settings/SettingsViewController.swift @@ -328,7 +328,7 @@ extension SettingsViewController: UITableViewDelegate { guard let item = dataSource.itemIdentifier(for: indexPath) else { return } switch item { - case .apperance: + case .appearance: // do nothing break case .notification: @@ -399,7 +399,7 @@ extension SettingsViewController: SettingsAppearanceTableViewCellDelegate { guard let dataSource = viewModel.dataSource else { return } guard let indexPath = tableView.indexPath(for: cell) else { return } let item = dataSource.itemIdentifier(for: indexPath) - guard case let .apperance(settingObjectID) = item else { return } + guard case let .appearance(settingObjectID) = item else { return } context.managedObjectContext.performChanges { let setting = self.context.managedObjectContext.object(with: settingObjectID) as! Setting diff --git a/Mastodon/Scene/Settings/SettingsViewModel.swift b/Mastodon/Scene/Settings/SettingsViewModel.swift index c168b5611..c489f2133 100644 --- a/Mastodon/Scene/Settings/SettingsViewModel.swift +++ b/Mastodon/Scene/Settings/SettingsViewModel.swift @@ -71,7 +71,7 @@ extension SettingsViewModel { var snapshot = NSDiffableDataSourceSnapshot() // appearance - let appearanceItems = [SettingsItem.apperance(settingObjectID: setting.objectID)] + let appearanceItems = [SettingsItem.appearance(settingObjectID: setting.objectID)] snapshot.appendSections([.apperance]) snapshot.appendItems(appearanceItems, toSection: .apperance) @@ -123,7 +123,7 @@ extension SettingsViewModel { guard let self = self else { return nil } switch item { - case .apperance(let objectID): + case .appearance(let objectID): let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: SettingsAppearanceTableViewCell.self), for: indexPath) as! SettingsAppearanceTableViewCell self.context.managedObjectContext.performAndWait { let setting = self.context.managedObjectContext.object(with: objectID) as! Setting diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift index 9a9ff7454..25bf4f1a0 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift @@ -48,7 +48,7 @@ class AppearanceView: UIView { didSet { checkBox.isSelected = selected if selected { - checkBox.imageView?.tintColor = Asset.Colors.Label.highlight.color + checkBox.imageView?.tintColor = Asset.Colors.brandBlue.color } else { checkBox.imageView?.tintColor = Asset.Colors.Label.secondary.color } diff --git a/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift b/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift index 82d0319f7..75e03d97c 100644 --- a/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift +++ b/Mastodon/Scene/Share/View/Button/PrimaryActionButton.swift @@ -38,10 +38,20 @@ extension PrimaryActionButton { private func _init() { titleLabel?.font = UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold)) setTitleColor(.white, for: .normal) + setupBackgroundAppearance() + applyCornerRadius(radius: 10) + } + + func setupBackgroundAppearance() { setBackgroundImage(UIImage.placeholder(color: Asset.Colors.brandBlue.color), for: .normal) setBackgroundImage(UIImage.placeholder(color: Asset.Colors.brandBlueDarken20.color), for: .highlighted) setBackgroundImage(UIImage.placeholder(color: Asset.Colors.disabled.color), for: .disabled) - applyCornerRadius(radius: 10) + } + + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + setupBackgroundAppearance() } func showLoading() { diff --git a/Mastodon/Scene/Share/View/Container/AudioContainerView.swift b/Mastodon/Scene/Share/View/Container/AudioContainerView.swift index 5661f833a..c4cf4f490 100644 --- a/Mastodon/Scene/Share/View/Container/AudioContainerView.swift +++ b/Mastodon/Scene/Share/View/Container/AudioContainerView.swift @@ -22,7 +22,7 @@ final class AudioContainerView: UIView { stackView.isLayoutMarginsRelativeArrangement = true stackView.layer.cornerRadius = AudioContainerView.cornerRadius stackView.clipsToBounds = true - stackView.backgroundColor = Asset.Colors.Background.AudioPlayer.highlight.color + stackView.backgroundColor = Asset.Colors.brandBlue.color stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() @@ -31,7 +31,7 @@ final class AudioContainerView: UIView { let view = UIView() view.layer.cornerRadius = 16 view.clipsToBounds = true - view.backgroundColor = Asset.Colors.Background.AudioPlayer.highlight.color + view.backgroundColor = Asset.Colors.brandBlue.color view.translatesAutoresizingMaskIntoConstraints = false return view }() diff --git a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift index 2bb32288f..4a6c61d8f 100644 --- a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift +++ b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift @@ -24,18 +24,21 @@ final class MosaicImageViewContainer: UIView { weak var delegate: MosaicImageViewContainerDelegate? let container = UIStackView() - var imageViews: [UIImageView] = [] { - didSet { - imageViews.forEach { imageView in - imageView.isUserInteractionEnabled = true - let tapGesture = UITapGestureRecognizer.singleTapGestureRecognizer - tapGesture.addTarget(self, action: #selector(MosaicImageViewContainer.photoTapGestureRecognizerHandler(_:))) - imageView.addGestureRecognizer(tapGesture) - imageView.isAccessibilityElement = true - } + private(set) lazy var imageViews: [UIImageView] = { + (0..<4).map { _ -> UIImageView in + let imageView = UIImageView() + imageView.isUserInteractionEnabled = true + let tapGesture = UITapGestureRecognizer.singleTapGestureRecognizer + tapGesture.addTarget(self, action: #selector(MosaicImageViewContainer.photoTapGestureRecognizerHandler(_:))) + imageView.addGestureRecognizer(tapGesture) + imageView.isAccessibilityElement = true + imageView.backgroundColor = .systemFill + return imageView } - } - var blurhashOverlayImageViews: [UIImageView] = [] + }() + let blurhashOverlayImageViews: [UIImageView] = { + (0..<4).map { _ in UIImageView() } + }() let contentWarningOverlayView: ContentWarningOverlayView = { let contentWarningOverlayView = ContentWarningOverlayView() @@ -97,12 +100,19 @@ extension MosaicImageViewContainer { container.subviews.forEach { subview in subview.removeFromSuperview() } + imageViews.forEach { imageView in + imageView.constraints.forEach { imageView.removeConstraint($0) } + imageView.removeFromSuperview() + } + blurhashOverlayImageViews.forEach { imageView in + imageView.constraints.forEach { imageView.removeConstraint($0) } + imageView.removeFromSuperview() + } + contentWarningOverlayView.removeFromSuperview() contentWarningOverlayView.blurVisualEffectView.effect = ContentWarningOverlayView.blurVisualEffect contentWarningOverlayView.vibrancyVisualEffectView.alpha = 1.0 contentWarningOverlayView.isUserInteractionEnabled = true - imageViews = [] - blurhashOverlayImageViews = [] container.spacing = UIView.separatorLineHeight(of: self) * 2 // 2px } @@ -129,8 +139,7 @@ extension MosaicImageViewContainer { }() let imageViewFrame = CGRect(origin: .zero, size: imageViewSize) - let imageView = UIImageView(frame: imageViewFrame) - imageViews.append(imageView) + let imageView = imageViews[0] imageView.layer.masksToBounds = true imageView.layer.cornerRadius = ContentWarningOverlayView.cornerRadius imageView.layer.cornerCurve = .continuous @@ -147,12 +156,11 @@ extension MosaicImageViewContainer { containerHeightLayoutConstraint.constant = imageViewFrame.height containerHeightLayoutConstraint.isActive = true - let blurhashOverlayImageView = UIImageView() + let blurhashOverlayImageView = blurhashOverlayImageViews[0] blurhashOverlayImageView.layer.masksToBounds = true blurhashOverlayImageView.layer.cornerRadius = ContentWarningOverlayView.cornerRadius blurhashOverlayImageView.layer.cornerCurve = .continuous blurhashOverlayImageView.contentMode = .scaleAspectFill - blurhashOverlayImageViews.append(blurhashOverlayImageView) blurhashOverlayImageView.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(blurhashOverlayImageView) NSLayoutConstraint.activate([ @@ -200,14 +208,9 @@ extension MosaicImageViewContainer { container.addArrangedSubview(contentLeftStackView) container.addArrangedSubview(contentRightStackView) - var imageViews: [UIImageView] = [] - var blurhashOverlayImageViews: [UIImageView] = [] - for _ in 0.. 1.2' - pod 'Texture', '~> 3.0.0' + pod 'Texture', '~> 3.0.0', :configurations => ['ASDK - Debug', 'ASDK - Release'] # misc pod 'SwiftGen', '~> 6.4.0' @@ -16,8 +16,8 @@ target 'Mastodon' do pod 'Kanna', '~> 5.2.2' # DEBUG - pod 'FLEX', '~> 4.4.0', :configurations => ['Debug'] - pod 'GDPerformanceView-Swift', '~> 2.1.1', :configurations => ['Debug'] + pod 'FLEX', '~> 4.4.0', :configurations => ['Debug', 'ASDK - Debug'] + pod 'GDPerformanceView-Swift', '~> 2.1.1', :configurations => ['Debug', 'ASDK - Debug'] target 'MastodonTests' do inherit! :search_paths diff --git a/Podfile.lock b/Podfile.lock index 9370907f9..ff92fb243 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -82,6 +82,6 @@ SPEC CHECKSUMS: Texture: 2f109e937850d94d1d07232041c9c7313ccddb81 "UITextField+Shake": 298ac5a0f239d731bdab999b19b628c956ca0ac3 -PODFILE CHECKSUM: ffa234348a25b078905180858ee4119fec0712d1 +PODFILE CHECKSUM: a0d0a385a2888802244e7841940a7d5a55315e1f COCOAPODS: 1.10.1