From 9d245985792333289a371111455c8d19d2939392 Mon Sep 17 00:00:00 2001 From: lillian rose winter Date: Tue, 26 Nov 2019 09:07:37 -0600 Subject: [PATCH] :lipstick: expand general section in preferences --- hanahakiprefs/HANARootListController.m | 10 ++++++++++ hanahakiprefs/Resources/Root.plist | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/hanahakiprefs/HANARootListController.m b/hanahakiprefs/HANARootListController.m index 15513a5..03977f0 100644 --- a/hanahakiprefs/HANARootListController.m +++ b/hanahakiprefs/HANARootListController.m @@ -27,4 +27,14 @@ } } +- (void)openReddit { + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"reddit://"]]) { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"reddit:///u/lilyshibe"] options:@{} completionHandler:nil]; + } + + else { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://reddit.com/u/lilyshibe"]]; + } +} + @end diff --git a/hanahakiprefs/Resources/Root.plist b/hanahakiprefs/Resources/Root.plist index ae0c2db..3f3a530 100644 --- a/hanahakiprefs/Resources/Root.plist +++ b/hanahakiprefs/Resources/Root.plist @@ -10,6 +10,12 @@ label hanahaki + + cell + PSStaticTextCell + label + hanahaki - 2019 lillian rose winter + cell PSButtonCell @@ -18,6 +24,14 @@ label twitter: @lilyshibe + + cell + PSButtonCell + action + openReddit + label + reddit: u/lilyshibe + cell PSGroupCell