Shorten hashtag action titles
This commit is contained in:
parent
f0e530722f
commit
ca03cf3b08
|
@ -133,7 +133,7 @@ extension MenuActionProvider {
|
||||||
let name = hashtag.name.lowercased()
|
let name = hashtag.name.lowercased()
|
||||||
let context = mastodonController.persistentContainer.viewContext
|
let context = mastodonController.persistentContainer.viewContext
|
||||||
let existing = try? context.fetch(SavedHashtag.fetchRequest(name: name, account: mastodonController.accountInfo!)).first
|
let existing = try? context.fetch(SavedHashtag.fetchRequest(name: name, account: mastodonController.accountInfo!)).first
|
||||||
let saveSubtitle = "Saved hashtags appear in the Explore section of Tusker"
|
let saveSubtitle = "Shown in the Explore section of Tusker"
|
||||||
let saveImage = UIImage(systemName: existing != nil ? "minus" : "plus")
|
let saveImage = UIImage(systemName: existing != nil ? "minus" : "plus")
|
||||||
actionsSection = [
|
actionsSection = [
|
||||||
UIAction(title: existing != nil ? "Unsave Hashtag" : "Save Hashtag", subtitle: saveSubtitle, image: saveImage, handler: { (_) in
|
UIAction(title: existing != nil ? "Unsave Hashtag" : "Save Hashtag", subtitle: saveSubtitle, image: saveImage, handler: { (_) in
|
||||||
|
@ -147,7 +147,7 @@ extension MenuActionProvider {
|
||||||
]
|
]
|
||||||
if mastodonController.instanceFeatures.canFollowHashtags {
|
if mastodonController.instanceFeatures.canFollowHashtags {
|
||||||
let existing = mastodonController.followedHashtags.first(where: { $0.name.lowercased() == name })
|
let existing = mastodonController.followedHashtags.first(where: { $0.name.lowercased() == name })
|
||||||
let subtitle = "Posts tagged with followed hashtags appear in your Home timeline"
|
let subtitle = "Posts appear in your Home timeline"
|
||||||
let image = UIImage(systemName: existing != nil ? "person.badge.minus" : "person.badge.plus")
|
let image = UIImage(systemName: existing != nil ? "person.badge.minus" : "person.badge.plus")
|
||||||
actionsSection.append(UIAction(title: existing != nil ? "Unfollow" : "Follow", subtitle: subtitle, image: image) { [unowned self] _ in
|
actionsSection.append(UIAction(title: existing != nil ? "Unfollow" : "Follow", subtitle: subtitle, image: image) { [unowned self] _ in
|
||||||
Task {
|
Task {
|
||||||
|
|
Loading…
Reference in New Issue