From dec543bc9579cd99686485a0de57a057a2d993c6 Mon Sep 17 00:00:00 2001 From: yaypixxo Date: Fri, 3 Jan 2020 14:04:06 +0100 Subject: [PATCH] added more comments --- Tweak.x | 2 ++ kageprefs/KgeRootListController.m | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Tweak.x b/Tweak.x index 1d30adb..ceca228 100644 --- a/Tweak.x +++ b/Tweak.x @@ -17,6 +17,7 @@ static void RespringDevice() { static NSString *nsDomainString = @"com.yaypixxo.kage"; static NSString *nsNotificationString = @"com.yaypixxo.kage/preferences.changed"; +// declare pref things here (switches, buttons, etc.) static BOOL enabled; static BOOL hideQuickActionsBG; static BOOL gridSwitcher; @@ -123,6 +124,7 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer, %end // SHOW TIME IN LS STATUSBAR END // +// LISTENERS %ctor { // prefs changed listener notificationCallback(NULL, NULL, NULL, NULL, NULL); diff --git a/kageprefs/KgeRootListController.m b/kageprefs/KgeRootListController.m index 007d9ec..bbe9978 100644 --- a/kageprefs/KgeRootListController.m +++ b/kageprefs/KgeRootListController.m @@ -13,6 +13,7 @@ -(void)openTwitter { NSURL *url; + // check which of these apps are installed if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]) { url = [NSURL URLWithString:@"tweetbot:///user_profile/Ra1nPix"]; } @@ -29,9 +30,12 @@ url = [NSURL URLWithString:@"https://mobile.twitter.com/Ra1nPix"]; } + // open my profile in the app chosen above + // if you're compiling with an iOS 10 or lower sdk you can leave out options:@{} and completionHandler:nil [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; } +// send respring notification -(void)saveTapped { CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.yaypixxo.kage/respring"), NULL, NULL, YES); }