Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Subject #263

Merged
merged 3 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions App/Comments/CommentsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CommentsViewController: UITableViewController {
guard post.url.host != nil else {
// hostless url means its an internal Hacker News link
// can also check postType but this is more future proof
self.showShareSheet(url: post.hackerNewsURL, sender: sender)
self.showShareSheet(url: post.hackerNewsURL, title: post.title, sender: sender)
return
}

Expand All @@ -124,13 +124,13 @@ class CommentsViewController: UITableViewController {

let postLinkAction = UIAlertAction(
title: "Article Link", style: .default) { _ in
self.showShareSheet(url: post.url, sender: sender)
self.showShareSheet(url: post.url, title: post.title, sender: sender)
}
alertController.addAction(postLinkAction)

let hackerNewsLinkAction = UIAlertAction(
title: "Hacker News Link", style: .default) { _ in
self.showShareSheet(url: post.hackerNewsURL, sender: sender)
self.showShareSheet(url: post.hackerNewsURL, title: post.title, sender: sender)
}
alertController.addAction(hackerNewsLinkAction)

Expand All @@ -139,12 +139,13 @@ class CommentsViewController: UITableViewController {
present(alertController, animated: true)
}

private func showShareSheet(url: URL, sender: UIBarButtonItem) {
private func showShareSheet(url: URL, title: String, sender: UIBarButtonItem) {
let activityViewController = UIActivityViewController(
activityItems: [url],
applicationActivities: nil
)
activityViewController.popoverPresentationController?.barButtonItem = sender
activityViewController.setValue(title, forKey: "subject")
present(activityViewController, animated: true, completion: nil)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Extensions/HackersActionExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.7.11</string>
<string>4.7.12</string>
<key>CFBundleVersion</key>
<string>121</string>
<string>122</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 deletions Extensions/HackersShareExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.7.11</string>
<string>4.7.12</string>
<key>CFBundleVersion</key>
<string>121</string>
<string>122</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
8 changes: 4 additions & 4 deletions Hackers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@
CODE_SIGN_ENTITLEMENTS = "App/Supporting Files/Hackers.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 121;
CURRENT_PROJECT_VERSION = 122;
DEVELOPMENT_TEAM = 2KB59GPA9B;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -1285,7 +1285,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.7.11;
MARKETING_VERSION = 4.7.12;
PRODUCT_BUNDLE_IDENTIFIER = "com.weiranzhang.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Hackers;
PROVISIONING_PROFILE_SPECIFIER = "Hackers Dev Profile";
Expand All @@ -1306,7 +1306,7 @@
CODE_SIGN_ENTITLEMENTS = "App/Supporting Files/Hackers.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 121;
CURRENT_PROJECT_VERSION = 122;
DEVELOPMENT_TEAM = 2KB59GPA9B;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -1317,7 +1317,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.7.11;
MARKETING_VERSION = 4.7.12;
PRODUCT_BUNDLE_IDENTIFIER = "com.weiranzhang.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Hackers;
PROVISIONING_PROFILE_SPECIFIER = "Hackers Prod Profile";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mxcl/PromiseKit",
"state" : {
"revision" : "43772616c46a44a9977e41924ae01d0e55f2f9ca",
"version" : "6.18.1"
"revision" : "8a98e31a47854d3180882c8068cc4d9381bf382d",
"version" : "6.22.1"
}
},
{
"identity" : "swiftsoup",
"kind" : "remoteSourceControl",
"location" : "https://github.com/scinfu/SwiftSoup.git",
"state" : {
"revision" : "6778575285177365cbad3e5b8a72f2a20583cfec",
"version" : "2.4.3"
"revision" : "0e96a20ffd37a515c5c963952d4335c89bed50a6",
"version" : "2.6.0"
}
},
{
"identity" : "swinject",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Swinject/Swinject.git",
"state" : {
"revision" : "11e65d83ba100459a41837119a8af32f182339f1",
"version" : "2.8.2"
"revision" : "8bc503e60965298984fb58cf47b71c541449fe2a",
"version" : "2.8.3"
}
},
{
Expand Down