-
Notifications
You must be signed in to change notification settings - Fork 385
Feature/show issues and pr count #2767
Feature/show issues and pr count #2767
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @LamourBt
Couple of comments from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, thank you so much @LamourBt!
Some small things, and we can get this in 😎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
…d of RepositoryIssuesViewController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, much better, lovely! Thanks so much for your patience again, @LamourBt 💪
return NSLocalizedString(newTitle, comment: "") | ||
} | ||
|
||
func composeLocalizedTitle() -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could combine these two functions, keeping the logic in the function rather than the caller?
To me that seems to make the code a little easier to grasp, and putting all the logic in the function.
// set the title
title = composeLocalizedTitle(using: itemCount)
func composeLocalizedTitle(using itemCount: Int?) -> String {
let newTitle: String
if let itemCount = itemCount, itemCount > 0 {
switch type {
case .issues: newTitle = "Issues (\(itemCount))"
case .pullRequests: newTitle = "Pull Requests (\(itemCount))"
}
} else {
switch type {
case .issues: newTitle = "Issues"
case .pullRequests: newTitle = "Pull Requests"
}
}
return NSLocalizedString(newTitle, comment: "")
}
What do you think?
@@ -157,14 +162,23 @@ EmptyViewDelegate { | |||
|
|||
self.controllers = controllers | |||
} | |||
|
|||
func buildQueryString(using repo: RepositoryDetails, _ searchString: String) -> String { | |||
return "repo:\(repo.owner)/\(repo.name) \(searchString) ".lowercased() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be two spaces (
) between the name and the string?
Merging; we can address the two comments later if we want to. They are no blocker for this awesomeness! |
This feature is based on this ticket #2718