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

Commit 0cf43b8

Browse files
authored
Lowercase issue/PR search string (#2360)
* fix lints * lowercase search string * fix more lints
1 parent f9a67a1 commit 0cf43b8

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

Classes/History/PathCommitSectionController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ final class PathCommitSectionController: ListSwiftSectionController<PathCommitMo
3434
}
3535

3636
}
37-

Classes/Issues/IssuesViewController.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ final class IssuesViewController: MessageViewController,
3535
IssueTextActionsViewSendDelegate,
3636
EmptyViewDelegate,
3737
MessageTextViewListener,
38-
IssueLabelTapSectionControllerDelegate
39-
{
38+
IssueLabelTapSectionControllerDelegate {
4039

4140
private let client: GithubClient
4241
private let model: IssueDetailsModel
@@ -486,7 +485,7 @@ final class IssuesViewController: MessageViewController,
486485
client: client,
487486
mergeCapable: viewerIsCollaborator,
488487
resultID: resultID
489-
)
488+
)
490489

491490
// deprecated
492491
case is IssueDiffHunkModel: return IssueDiffHunkSectionController()
@@ -635,9 +634,9 @@ final class IssuesViewController: MessageViewController,
635634

636635
func didChangeSelection(textView: MessageTextView) {}
637636
func willChangeRange(textView: MessageTextView, to range: NSRange) {}
638-
637+
639638
// MARK: IssueLabelsSectionControllerDelegate
640-
639+
641640
func didTapIssueLabel(owner: String, repo: String, label: String) {
642641
guard let issueType = self.issueType else { return }
643642
presentLabels(client: client, owner: owner, repo: repo, label: label, type: issueType)

Classes/Issues/Labeled/IssueLabeledSectionController.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import Foundation
1010
import IGListKit
1111

12-
13-
1412
final class IssueLabeledSectionController: ListGenericSectionController<IssueLabeledModel>, MarkdownStyledTextViewDelegate {
1513

1614
private let issueModel: IssueDetailsModel
@@ -35,13 +33,13 @@ final class IssueLabeledSectionController: ListGenericSectionController<IssueLab
3533
cell.delegate = self
3634
return cell
3735
}
38-
36+
3937
func didTap(cell: MarkdownStyledTextView, attribute: DetectedMarkdownAttribute) {
4038
if case .label(let label) = attribute {
4139
tapDelegate?.didTapIssueLabel(owner: label.owner, repo: label.repo, label: label.label)
4240
} else {
4341
viewController?.handle(attribute: attribute)
4442
}
4543
}
46-
44+
4745
}

Classes/Issues/Labels/IssueLabelsSectionController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
import UIKit
1010
import IGListKit
1111

12-
1312
protocol IssueLabelTapSectionControllerDelegate: class {
1413
func didTapIssueLabel(owner: String, repo: String, label: String)
1514
}
1615

1716
final class IssueLabelsSectionController: ListBindingSectionController<IssueLabelsModel>,
18-
ListBindingSectionControllerDataSource,
17+
ListBindingSectionControllerDataSource,
1918
ListBindingSectionControllerSelectionDelegate {
2019

2120
private let issue: IssueDetailsModel

Classes/Repository/RepositoryIssuesViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum RepositoryIssuesType {
1515
}
1616

1717
class RepositoryIssuesViewController: BaseListViewController<NSString>,
18-
BaseListViewControllerDataSource,
18+
BaseListViewControllerDataSource,
1919
SearchBarSectionControllerDelegate {
2020

2121
private var models = [ListDiffable]()
@@ -58,7 +58,7 @@ SearchBarSectionControllerDelegate {
5858
super.viewDidLoad()
5959

6060
makeBackBarItemEmpty()
61-
61+
6262
let presentingInTabMan = label == nil
6363
if presentingInTabMan {
6464
// set the frame in -viewDidLoad is required when working with TabMan
@@ -139,7 +139,7 @@ SearchBarSectionControllerDelegate {
139139
case .issues: typeQuery = "is:issue"
140140
case .pullRequests: typeQuery = "is:pr"
141141
}
142-
return "repo:\(owner)/\(repo) \(typeQuery) \(previousSearchString)"
142+
return "repo:\(owner)/\(repo) \(typeQuery) \(previousSearchString)".lowercased()
143143
}
144144

145145
}

Classes/View Controllers/UIViewController+PresentLabels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension UIViewController {
1919
type: type,
2020
label: label
2121
)
22-
22+
2323
navigationController?.pushViewController(
2424
repositoryIssuesViewController,
2525
animated: true

0 commit comments

Comments
 (0)