diff --git a/Artwork/Icons/More.svg b/Artwork/Icons/More.svg new file mode 100644 index 00000000..2c9236d7 --- /dev/null +++ b/Artwork/Icons/More.svg @@ -0,0 +1,84 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/Artwork/Icons/Reblog.svg b/Artwork/Icons/Reblog.svg index 3935d931..bce41aad 100644 --- a/Artwork/Icons/Reblog.svg +++ b/Artwork/Icons/Reblog.svg @@ -7,7 +7,6 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="793.70081" @@ -102,22 +101,15 @@ inkscape:groupmode="layer" id="layer1" style="opacity:0.92000002;filter:url(#filter2010)"> - - - - + + diff --git a/Tusker/Assets.xcassets/More.imageset/Contents.json b/Tusker/Assets.xcassets/More.imageset/Contents.json index 068cb005..7bdf4445 100644 --- a/Tusker/Assets.xcassets/More.imageset/Contents.json +++ b/Tusker/Assets.xcassets/More.imageset/Contents.json @@ -19,6 +19,7 @@ "author" : "xcode" }, "properties" : { + "template-rendering-intent" : "template", "preserves-vector-representation" : true } } \ No newline at end of file diff --git a/Tusker/Assets.xcassets/More.imageset/More.pdf b/Tusker/Assets.xcassets/More.imageset/More.pdf index f1d42118..e52037e6 100644 Binary files a/Tusker/Assets.xcassets/More.imageset/More.pdf and b/Tusker/Assets.xcassets/More.imageset/More.pdf differ diff --git a/Tusker/Extensions/UIViewController+Delegates.swift b/Tusker/Extensions/UIViewController+Delegates.swift index 1a9b478e..fb1d4a0a 100644 --- a/Tusker/Extensions/UIViewController+Delegates.swift +++ b/Tusker/Extensions/UIViewController+Delegates.swift @@ -77,7 +77,20 @@ extension StatusTableViewCellDelegate where Self: UIViewController { present(vc, animated: true) } - func updatedStatus(for cell: StatusTableViewCell, status: Status) { + func showMoreOptions(status: Status) { + let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) + if let url = status.url { + alert.addAction(UIAlertAction(title: "Open in Safari...", style: .default, handler: { _ in + let vc = SFSafariViewController(url: url) + self.present(vc, animated: true) + })) + alert.addAction(UIAlertAction(title: "Share...", style: .default, handler: { _ in + let vc = UIActivityViewController(activityItems: [url], applicationActivities: nil) + self.present(vc, animated: true) + })) + } + alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) + present(alert, animated: true) } } diff --git a/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.xib b/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.xib index 5147d9c3..84307e48 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.xib +++ b/Tusker/Views/Profile Header/ProfileHeaderTableViewCell.xib @@ -60,13 +60,13 @@ + @@ -121,6 +131,7 @@ + @@ -148,6 +159,7 @@ + diff --git a/Tusker/Views/Status/StatusTableViewCell.swift b/Tusker/Views/Status/StatusTableViewCell.swift index c133e47b..72fdd758 100644 --- a/Tusker/Views/Status/StatusTableViewCell.swift +++ b/Tusker/Views/Status/StatusTableViewCell.swift @@ -25,7 +25,7 @@ protocol StatusTableViewCellDelegate { func showLargeImage(_ image: UIImage, description: String?, animatingFrom originView: UIView) - func updatedStatus(for cell: StatusTableViewCell, status: Status) + func showMoreOptions(status: Status) } @@ -248,6 +248,10 @@ class StatusTableViewCell: UITableViewCell, PreferencesAdaptive { } } + @IBAction func morePressed(_ sender: Any) { + delegate?.showMoreOptions(status: status) + } + } extension StatusTableViewCell: HTMLContentLabelDelegate { diff --git a/Tusker/Views/Status/StatusTableViewCell.xib b/Tusker/Views/Status/StatusTableViewCell.xib index 704abfa2..c473c0d5 100644 --- a/Tusker/Views/Status/StatusTableViewCell.xib +++ b/Tusker/Views/Status/StatusTableViewCell.xib @@ -86,8 +86,8 @@ - - + + + @@ -127,6 +137,7 @@ + @@ -156,6 +167,7 @@ +