Skip to content
Open
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
6 changes: 6 additions & 0 deletions ios/HackerNews/AppViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ final class AppViewModel {
func openLink(url: URL) {
navigationPath.append(AppNavigation.webLink(url: url, title: ""))
}

func openSafariLink(url: URL) {
// X.com disables WKWebview, so lets open in safari
// Safari Services doesn't play well with SwiftUI
UIApplication.shared.open(url)
}

func toggleBookmark(_ item: StoryContent) {
let currentStories = feedState.storiesForFeed(feedState.selectedFeed)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x59",
"green" : "0x2D",
"red" : "0x36"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
12 changes: 12 additions & 0 deletions ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "Sentry.symbols.svg",
"idiom" : "universal"
}
]
}
103 changes: 103 additions & 0 deletions ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ios/HackerNews/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,17 @@
}
}
},
"settings.row.followSentry" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Follow Sentry"
}
}
}
},
"settings.row.followSupergooey" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
26 changes: 22 additions & 4 deletions ios/HackerNews/Settings/SettingsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,27 @@ struct SettingsScreen: View {

},
action: {
model.openLink(
url: URL(string: "https://www.twitter.com/emergetools")!)
model.openSafariLink(
url: URL(string: "https://www.x.com/emergetools")!)
}
)

SettingsRow(
text: "Fake text dont land",
leadingIcon: {
Image("Sentry")
.font(.system(size: 12))
.foregroundStyle(HNColors.sentry)
},
trailingIcon: {
Image(systemName: "arrow.up.right")
.font(.system(size: 12))
.foregroundStyle(.onBackground)

},
action: {
model.openSafariLink(
url: URL(string: "https://www.x.com/sentry")!)
}
)

Expand All @@ -63,8 +81,8 @@ struct SettingsScreen: View {

},
action: {
model.openLink(
url: URL(string: "https://www.twitter.com/heyrikin")!)
model.openSafariLink(
url: URL(string: "https://www.x.com/heyrikin")!)
}
)

Expand Down
1 change: 1 addition & 0 deletions ios/Packages/Common/Sources/Common/Utils/Colors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public struct HNColors {
public static let background = Color("Background")
public static let commentBackground = Color("CommentBackground")
public static let red = Color("HNRed")
public static let sentry = Color("Sentry")
}