Skip to content

Commit 9f2b128

Browse files
committed
Use TagsView to manage post tags
1 parent 3cfb859 commit 9f2b128

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

WordPress/Classes/ViewRelated/Post/PostSettings/PostSettingsViewModel.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,7 @@ final class PostSettingsViewModel: ObservableObject {
248248
}
249249

250250
func showTagsPicker() {
251-
let tagsVC = PostTagPickerViewController(
252-
tags: settings.tags,
253-
blog: post.blog
254-
)
255-
tagsVC.onValueChanged = { [weak self] newTagsString in
251+
let tagsVC = TagsViewController(blog: post.blog, selectedTags: settings.tags) { [weak self] newTagsString in
256252
self?.settings.tags = newTagsString
257253
}
258254
viewController?.navigationController?.pushViewController(tagsVC, animated: true)

WordPress/Classes/ViewRelated/Post/Prepublishing/PrepublishingViewController.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,7 @@ final class PrepublishingViewController: UIViewController, UITableViewDataSource
319319

320320
private func didTapTagCell() {
321321
let post = post as! Post
322-
let tagPickerViewController = PostTagPickerViewController(tags: post.tags ?? "", blog: post.blog)
323-
324-
tagPickerViewController.onValueChanged = { [weak self] tags in
322+
let tagPickerViewController = TagsViewController(blog: post.blog, selectedTags: post.tags) {[weak self] tags in
325323
guard let self else { return }
326324
WPAnalytics.track(.editorPostTagsChanged, properties: Constants.analyticsDefaultProperty)
327325

0 commit comments

Comments
 (0)