]> git.cameronkatri.com Git - tweaks.git/blobdiff - QuickActions/QuickActionsPrefs/QASRootListController.m
Fix iOS 15+
[tweaks.git] / QuickActions / QuickActionsPrefs / QASRootListController.m
index 0d26dc731b1309cd049d69923740f51e04500e91..c3701eb04fea21b24e7a47bdd46777fa8fee5325 100644 (file)
  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
-#import "Preferences/PSTableCell.h"
 #import <Foundation/Foundation.h>
+#import <Preferences/PSSpecifier.h>
 #import "QASRootListController.h"
 #include <spawn.h>
+#include <rootless.h>
 
 @implementation QASRootListController
 
        return _specifiers;
 }
 
--(void)viewDidLoad
-{
-       [super viewDidLoad];
-       UIBarButtonItem *respringButton = [[UIBarButtonItem alloc] initWithTitle:@"Apply"
-                                                                                                                                                                                                                                                                                                                       style:UIBarButtonItemStylePlain
-                                                                                                                                                                                                                                                                                                                target:self
-                                                                                                                                                                                                                                                                                                                action:@selector(respring)];
-       respringButton.tintColor = [UIColor systemRedColor];
-       [self.navigationItem setRightBarButtonItem:respringButton];
-}
-
 -(void)openSource
 {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://git.cameronkatri.com/tweaks/tree/QuickActions"] options:@{} completionHandler:nil];
@@ -50,7 +40,7 @@
 {
        pid_t pid;
        const char *args[] = {"sbreload", NULL, NULL, NULL};
-       posix_spawn(&pid, "usr/bin/sbreload", NULL, NULL, (char *const *)args, NULL);
+       posix_spawn(&pid, ROOT_PATH("/usr/bin/sbreload"), NULL, NULL, (char *const *)args, NULL);
 }
 
 @end