Skip to content

Commit

Permalink
Align dismiss icon for notification filters with web
Browse files Browse the repository at this point in the history
  • Loading branch information
kimar committed Jul 29, 2024
1 parent 5d8e453 commit 97d6a08
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Mastodon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
2A3F6FE3292ECB5E002E6DA7 /* FollowedTagsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A3F6FE2292ECB5E002E6DA7 /* FollowedTagsViewModel.swift */; };
2A3F6FE5292F6E44002E6DA7 /* FollowedTagsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A3F6FE4292F6E44002E6DA7 /* FollowedTagsTableViewCell.swift */; };
2A409F832B5955290044E472 /* MastodonStatusThreadViewModel+State.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A409F822B5955290044E472 /* MastodonStatusThreadViewModel+State.swift */; };
2A4C3B5D2C579CFB008DD42B /* NotificationRequestConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4C3B5C2C579CFB008DD42B /* NotificationRequestConstants.swift */; };
2A506CF4292CD85800059C37 /* FollowedTagsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A506CF3292CD85800059C37 /* FollowedTagsViewController.swift */; };
2A506CF6292D040100059C37 /* HashtagTimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A506CF5292D040100059C37 /* HashtagTimelineHeaderView.swift */; };
2A5242732C199C96005B9E22 /* PrivacySafetyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5242722C199C96005B9E22 /* PrivacySafetyView.swift */; };
Expand Down Expand Up @@ -649,6 +650,7 @@
2A3F6FE2292ECB5E002E6DA7 /* FollowedTagsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowedTagsViewModel.swift; sourceTree = "<group>"; };
2A3F6FE4292F6E44002E6DA7 /* FollowedTagsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowedTagsTableViewCell.swift; sourceTree = "<group>"; };
2A409F822B5955290044E472 /* MastodonStatusThreadViewModel+State.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MastodonStatusThreadViewModel+State.swift"; sourceTree = "<group>"; };
2A4C3B5C2C579CFB008DD42B /* NotificationRequestConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationRequestConstants.swift; sourceTree = "<group>"; };
2A506CF3292CD85800059C37 /* FollowedTagsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowedTagsViewController.swift; sourceTree = "<group>"; };
2A506CF5292D040100059C37 /* HashtagTimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HashtagTimelineHeaderView.swift; sourceTree = "<group>"; };
2A5242722C199C96005B9E22 /* PrivacySafetyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacySafetyView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1859,6 +1861,7 @@
D85DF96F2C481B1100A01408 /* NotificationRequestTableViewCell.swift */,
D85DF9752C4965A900A01408 /* NotificationRequestsViewModel.swift */,
D85DF9792C4E49A400A01408 /* NotificationRequestCountView.swift */,
2A4C3B5C2C579CFB008DD42B /* NotificationRequestConstants.swift */,
);
name = Requests;
path = "Notification Filtering/Requests";
Expand Down Expand Up @@ -3746,6 +3749,7 @@
DB0618052785A73D0030EE79 /* RegisterItem.swift in Sources */,
2A5242732C199C96005B9E22 /* PrivacySafetyView.swift in Sources */,
DB6B74EF272FB55000C70B6E /* FollowerListViewController.swift in Sources */,
2A4C3B5D2C579CFB008DD42B /* NotificationRequestConstants.swift in Sources */,
DB4AA6B327BA34B6009EC082 /* CellFrameCacheContainer.swift in Sources */,
DB0FCB942797E2B0006C02E2 /* SearchResultViewModel+Diffable.swift in Sources */,
DB63F752279944AA00455B82 /* SearchHistorySectionHeaderCollectionReusableView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AccountNotificationTimelineViewController: NotificationTimelineViewControl
self.delegate?.acceptRequest(self, request: request)
coordinator.hideLoading()
},
UIAction(title: L10n.Scene.Notification.FilteredNotification.dismiss, image: UIImage(systemName: "speaker.slash")) { [weak self] _ in
UIAction(title: L10n.Scene.Notification.FilteredNotification.dismiss, image: NotificationRequestConstants.dismissIcon) { [weak self] _ in
guard let self else { return }

coordinator.showLoading()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright © 2024 Mastodon gGmbH. All rights reserved.

import UIKit

enum NotificationRequestConstants {
static let dismissIcon = UIImage(systemName: "trash")
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class NotificationRequestTableViewCell: UITableViewCell {
rejectNotificationRequestButton.titleLabel?.font = UIFont.systemFont(ofSize: 17, weight: .semibold)
rejectNotificationRequestButton.setTitleColor(.black, for: .normal)
rejectNotificationRequestButton.setTitle(L10n.Scene.Notification.FilteredNotification.dismiss, for: .normal)
rejectNotificationRequestButton.setImage(UIImage(systemName: "speaker.slash"), for: .normal)
rejectNotificationRequestButton.setImage(NotificationRequestConstants.dismissIcon, for: .normal)
rejectNotificationRequestButton.imageView?.contentMode = .scaleAspectFit
rejectNotificationRequestButton.setInsets(forContentPadding: UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8), imageTitlePadding: 8)
rejectNotificationRequestButton.setBackgroundImage(.placeholder(color: Asset.Scene.Notification.deleteFollowRequestButtonBackground.color), for: .normal)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extension NotificationRequestsTableViewController: UITableViewDelegate {
completion(true)
}

dismissAction.image = UIImage(systemName: "speaker.slash")
dismissAction.image = NotificationRequestConstants.dismissIcon

let swipeAction = UISwipeActionsConfiguration(actions: [dismissAction])
swipeAction.performsFirstActionWithFullSwipe = true
Expand Down

0 comments on commit 97d6a08

Please sign in to comment.