chore: correct hashtag typo
This commit is contained in:
parent
fbe3a8c419
commit
ecd595c6e8
|
@ -67,7 +67,7 @@ extension StatusProviderFacade {
|
|||
static func responseToStatusActiveLabelAction(provider: StatusProvider, cell: UITableViewCell, activeLabel: ActiveLabel, didTapEntity entity: ActiveEntity) {
|
||||
switch entity.type {
|
||||
case .hashtag(let text, _):
|
||||
let hashtagTimelienViewModel = HashtagTimelineViewModel(context: provider.context, hashTag: text)
|
||||
let hashtagTimelienViewModel = HashtagTimelineViewModel(context: provider.context, hashtag: text)
|
||||
provider.coordinator.present(scene: .hashtagTimeline(viewModel: hashtagTimelienViewModel), from: provider, transition: .show)
|
||||
case .mention(let text, _):
|
||||
coordinateToStatusMentionProfileScene(for: .primary, provider: provider, cell: cell, mention: text)
|
||||
|
|
|
@ -53,8 +53,8 @@ extension HashtagTimelineViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = "#\(viewModel.hashTag)"
|
||||
titleView.updateTitle(hashtag: viewModel.hashTag, peopleNumber: nil)
|
||||
title = "#\(viewModel.hashtag)"
|
||||
titleView.updateTitle(hashtag: viewModel.hashtag, peopleNumber: nil)
|
||||
navigationItem.titleView = titleView
|
||||
|
||||
view.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
|
@ -142,7 +142,7 @@ extension HashtagTimelineViewController {
|
|||
private func updatePromptTitle() {
|
||||
var subtitle: String?
|
||||
defer {
|
||||
titleView.updateTitle(hashtag: viewModel.hashTag, peopleNumber: subtitle)
|
||||
titleView.updateTitle(hashtag: viewModel.hashtag, peopleNumber: subtitle)
|
||||
}
|
||||
guard let histories = viewModel.hashtagEntity.value?.history else {
|
||||
return
|
||||
|
@ -167,7 +167,7 @@ extension HashtagTimelineViewController {
|
|||
|
||||
@objc private func composeBarButtonItemPressed(_ sender: UIBarButtonItem) {
|
||||
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
let composeViewModel = ComposeViewModel(context: context, composeKind: .post, preInsertedContent: "#\(viewModel.hashTag)")
|
||||
let composeViewModel = ComposeViewModel(context: context, composeKind: .post, preInsertedContent: "#\(viewModel.hashtag)")
|
||||
coordinator.present(scene: .compose(viewModel: composeViewModel), from: self, transition: .modal(animated: true, completion: nil))
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ extension HashtagTimelineViewModel.LoadLatestState {
|
|||
// TODO: only set large count when using Wi-Fi
|
||||
viewModel.context.apiService.hashtagTimeline(
|
||||
domain: activeMastodonAuthenticationBox.domain,
|
||||
hashtag: viewModel.hashTag,
|
||||
hashtag: viewModel.hashtag,
|
||||
authorizationBox: activeMastodonAuthenticationBox)
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { completion in
|
||||
|
|
|
@ -67,7 +67,7 @@ extension HashtagTimelineViewModel.LoadMiddleState {
|
|||
viewModel.context.apiService.hashtagTimeline(
|
||||
domain: activeMastodonAuthenticationBox.domain,
|
||||
maxID: maxID,
|
||||
hashtag: viewModel.hashTag,
|
||||
hashtag: viewModel.hashtag,
|
||||
authorizationBox: activeMastodonAuthenticationBox)
|
||||
.delay(for: .seconds(1), scheduler: DispatchQueue.main)
|
||||
.receive(on: DispatchQueue.main)
|
||||
|
|
|
@ -58,7 +58,7 @@ extension HashtagTimelineViewModel.LoadOldestState {
|
|||
viewModel.context.apiService.hashtagTimeline(
|
||||
domain: activeMastodonAuthenticationBox.domain,
|
||||
maxID: maxID,
|
||||
hashtag: viewModel.hashTag,
|
||||
hashtag: viewModel.hashtag,
|
||||
authorizationBox: activeMastodonAuthenticationBox)
|
||||
.delay(for: .seconds(1), scheduler: DispatchQueue.main)
|
||||
.receive(on: DispatchQueue.main)
|
||||
|
|
|
@ -15,7 +15,7 @@ import MastodonSDK
|
|||
|
||||
final class HashtagTimelineViewModel: NSObject {
|
||||
|
||||
let hashTag: String
|
||||
let hashtag: String
|
||||
|
||||
var disposeBag = Set<AnyCancellable>()
|
||||
|
||||
|
@ -65,9 +65,9 @@ final class HashtagTimelineViewModel: NSObject {
|
|||
var cellFrameCache = NSCache<NSNumber, NSValue>()
|
||||
|
||||
|
||||
init(context: AppContext, hashTag: String) {
|
||||
init(context: AppContext, hashtag: String) {
|
||||
self.context = context
|
||||
self.hashTag = hashTag
|
||||
self.hashtag = hashtag
|
||||
let activeMastodonAuthenticationBox = context.authenticationService.activeMastodonAuthenticationBox.value
|
||||
self.fetchedResultsController = StatusFetchedResultsController(managedObjectContext: context.managedObjectContext, domain: activeMastodonAuthenticationBox?.domain, additionalTweetPredicate: nil)
|
||||
super.init()
|
||||
|
@ -84,13 +84,13 @@ final class HashtagTimelineViewModel: NSObject {
|
|||
guard let activeMastodonAuthenticationBox = context.authenticationService.activeMastodonAuthenticationBox.value else {
|
||||
return
|
||||
}
|
||||
let query = Mastodon.API.Search.Query(q: hashTag, type: .hashtags)
|
||||
let query = Mastodon.API.Search.Query(q: hashtag, type: .hashtags)
|
||||
context.apiService.search(domain: activeMastodonAuthenticationBox.domain, query: query, mastodonAuthenticationBox: activeMastodonAuthenticationBox)
|
||||
.sink { _ in
|
||||
|
||||
} receiveValue: { [weak self] response in
|
||||
let matchedTag = response.value.hashtags.first { tag -> Bool in
|
||||
return tag.name == self?.hashTag
|
||||
return tag.name == self?.hashtag
|
||||
}
|
||||
self?.hashtagEntity.send(matchedTag)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue