Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 1d0c6c9

Browse files
LucianoPAlmeidajdisho
authored andcommitted
Fix #2769 (#2770)
* Changing request review message to self when the same user * Fixing PR comments * If the notification type is security vulnerability, show repo * Removing issue number from secure vulnerability issue * guard statement
1 parent 97a8fbb commit 1d0c6c9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Classes/Notifications/NotificationCell.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ final class NotificationCell: SelectableCell, CAAnimationDelegate {
170170
let title = NSMutableAttributedString(string: "\(model.owner)/\(model.repo) ", attributes: titleAttributes)
171171
titleAttributes[.font] = Styles.Text.secondary.preferredFont
172172
switch model.number {
173-
case .number(let number): title.append(NSAttributedString(string: "#\(number)", attributes: titleAttributes))
173+
case .number(let number):
174+
guard model.type != .securityVulnerability else { break }
175+
title.append(NSAttributedString(string: "#\(number)", attributes: titleAttributes))
174176
default: break
175177
}
176178
detailsLabel.attributedText = title

Classes/Notifications/NotificationSectionController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ final class NotificationSectionController: ListSwiftSectionController<Notificati
8181

8282
BadgeNotifications.clear(for: model)
8383

84+
guard model.type != .securityVulnerability else {
85+
viewController?.route_push(to: RepositoryViewController(
86+
client: modelController.githubClient,
87+
repo: RepositoryDetails(owner: model.owner, name: model.repo)
88+
))
89+
return
90+
}
91+
8492
switch model.number {
8593
case .hash(let hash):
8694
viewController?.presentCommit(owner: model.owner, repo: model.repo, hash: hash)

0 commit comments

Comments
 (0)