Add missing # symbol (IOS-287)
This commit is contained in:
parent
cd4ef9f31c
commit
bff3afb3a4
|
@ -202,12 +202,13 @@ final class HomeTimelineViewController: UIViewController, NeedsDependency, Media
|
|||
).singleOutput().value) ?? []
|
||||
|
||||
var listEntries = lists.map { entry in
|
||||
return LabeledAction(title: entry.name, image: nil, handler: { [weak self] in
|
||||
let entryName = "#\(entry.name)"
|
||||
return LabeledAction(title: entryName, image: nil, handler: { [weak self] in
|
||||
guard let self, let viewModel = self.viewModel else { return }
|
||||
viewModel.timelineContext = .hashtag(entry.name)
|
||||
viewModel.loadLatestStateMachine.enter(HomeTimelineViewModel.LoadLatestState.ContextSwitch.self)
|
||||
timelineSelectorButton.setAttributedTitle(
|
||||
.init(string: entry.name, attributes: [
|
||||
.init(string: entryName, attributes: [
|
||||
.font: UIFontMetrics(forTextStyle: .headline).scaledFont(for: .systemFont(ofSize: 20, weight: .semibold))
|
||||
]),
|
||||
for: .normal)
|
||||
|
|
|
@ -23,7 +23,7 @@ class HashtagIntentHandler: INExtension, HashtagIntentHandling {
|
|||
.search(query: .init(q: searchTerm, type: .hashtags), authenticationBox: authenticationBox)
|
||||
.value
|
||||
.hashtags
|
||||
.compactMap { $0.name as NSString }
|
||||
.compactMap { "#\($0.name)" as NSString }
|
||||
|
||||
results = searchResults
|
||||
|
||||
|
@ -33,7 +33,7 @@ class HashtagIntentHandler: INExtension, HashtagIntentHandling {
|
|||
query: Mastodon.API.Account.FollowedTagsQuery(limit: nil),
|
||||
authenticationBox: authenticationBox)
|
||||
.value
|
||||
.compactMap { $0.name as NSString }
|
||||
.compactMap { "#\($0.name)" as NSString }
|
||||
|
||||
results = followedTags
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ extension HashtagWidgetProvider {
|
|||
let desiredHashtag: String
|
||||
|
||||
if let hashtag = configuration.hashtag {
|
||||
desiredHashtag = hashtag
|
||||
desiredHashtag = hashtag.replacingOccurrences(of: "#", with: "")
|
||||
} else {
|
||||
return completion(.notFound("hashtag"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue