diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json index abe46b9a..55f84c26 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "255", - "green" : "255", - "red" : "255" + "blue" : "0xFE", + "green" : "0xFF", + "red" : "0xFE" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x37", - "green" : "0x2D", - "red" : "0x29" + "blue" : "0x2E", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json index 91dac809..6bce2b69 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.216", - "green" : "0.176", - "red" : "0.161" + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json index d8f32572..55f84c26 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0xFF", + "blue" : "0xFE", "green" : "0xFF", - "red" : "0xFF" + "red" : "0xFE" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x2B", - "green" : "0x23", - "red" : "0x1F" + "blue" : "0x2E", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json index d4705004..6bce2b69 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x2B", - "green" : "0x23", - "red" : "0x1F" + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json index 8953c8fb..70b1446d 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Label/secondary.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "0.600", - "blue" : "67", - "green" : "60", - "red" : "60" + "blue" : "0x43", + "green" : "0x3C", + "red" : "0x3C" } }, "idiom" : "universal" diff --git a/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift b/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift index b098c1ec..0f6a804b 100644 --- a/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift +++ b/Mastodon/Scene/Profile/Header/View/ProfileRelationshipActionButton.swift @@ -34,7 +34,13 @@ extension ProfileRelationshipActionButton { setTitleColor(UIColor.white.withAlphaComponent(0.5), for: .highlighted) setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .normal) setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .highlighted) - setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor.withAlphaComponent(0.5)), for: .disabled) + setBackgroundImage(.placeholder(color: actionOptionSet.backgroundColor), for: .disabled) + + if let option = actionOptionSet.highPriorityAction(except: .editOptions), option == .blocked { + isEnabled = false + } else { + isEnabled = true + } } } diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index 1fe7a908..59cf4809 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -419,43 +419,6 @@ extension ProfileViewController { // os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) // coordinator.present(scene: .drawerSidebar, from: self, transition: .custom(transitioningDelegate: drawerSidebarTransitionController)) // } -// -// @objc private func unmuteBarButtonItemPressed(_ sender: UIBarButtonItem) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// guard let twitterUser = viewModel.twitterUser.value else { -// assertionFailure() -// return -// } -// -// UserProviderFacade.toggleMuteUser( -// context: context, -// twitterUser: twitterUser, -// muted: viewModel.muted.value -// ) -// .sink { _ in -// // do nothing -// } receiveValue: { _ in -// // do nothing -// } -// .store(in: &disposeBag) -// } -// -// @objc private func moreMenuBarButtonItemPressed(_ sender: UIBarButtonItem) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// guard let twitterUser = viewModel.twitterUser.value else { -// assertionFailure() -// return -// } -// -// let moreMenuAlertController = UserProviderFacade.createMoreMenuAlertControllerForUser( -// twitterUser: twitterUser, -// muted: viewModel.muted.value, -// blocked: viewModel.blocked.value, -// sender: sender, -// dependency: self -// ) -// present(moreMenuAlertController, animated: true, completion: nil) -// } } diff --git a/Mastodon/Scene/Profile/ProfileViewModel.swift b/Mastodon/Scene/Profile/ProfileViewModel.swift index 5df8952b..057e1803 100644 --- a/Mastodon/Scene/Profile/ProfileViewModel.swift +++ b/Mastodon/Scene/Profile/ProfileViewModel.swift @@ -307,8 +307,8 @@ extension ProfileViewModel { case pending case following case muting - case blocking case blocked + case blocking case edit case editing @@ -326,8 +326,8 @@ extension ProfileViewModel { static let pending = RelationshipAction.pending.option static let following = RelationshipAction.following.option static let muting = RelationshipAction.muting.option - static let blocking = RelationshipAction.blocking.option static let blocked = RelationshipAction.blocked.option + static let blocking = RelationshipAction.blocking.option static let edit = RelationshipAction.edit.option static let editing = RelationshipAction.editing.option @@ -353,8 +353,8 @@ extension ProfileViewModel { 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 .blocking: return L10n.Common.Controls.Firendship.blocked case .blocked: return L10n.Common.Controls.Firendship.follow // blocked by user + case .blocking: return L10n.Common.Controls.Firendship.blocked case .edit: return L10n.Common.Controls.Firendship.editInfo case .editing: return L10n.Common.Controls.Actions.done } @@ -371,8 +371,8 @@ extension ProfileViewModel { case .pending: return Asset.Colors.Button.normal.color case .following: return Asset.Colors.Button.normal.color case .muting: return Asset.Colors.Background.alertYellow.color - case .blocking: return Asset.Colors.Background.danger.color case .blocked: return Asset.Colors.Button.disabled.color + case .blocking: return Asset.Colors.Background.danger.color case .edit: return Asset.Colors.Button.normal.color case .editing: return Asset.Colors.Button.normal.color }