akemin-dayo / PreferenceOrganizer2

Organise the iOS Settings app!
https://cydia.akemi.ai/?page/net.angelxwind.preferenceorganizer2
BSD 2-Clause "Simplified" License
61 stars 33 forks source link

Persistent issues with prefs:root=Tweaks&path=x URLs #22

Closed billybooth closed 7 years ago

billybooth commented 7 years ago

I know you're already aware of this issue, but do you think something similar to this (but not so atrocious) would work?


-(void) preferenceOrganizerOpenTweakPane:(NSString *)name {
    for (PSSpecifier *specifier in TweakSpecifiers) {
        if ( [[specifier name] caseInsensitiveCompare:[name stringByRemovingPercentEncoding]] == NSOrderedSame ) {
            [[[self rootController] navigationController] pushViewController:[[specifier target] controllerForSpecifier:specifier] animated:NO];
            break;
        }
    }
}

Crap, posted with wrong GitHub account.

fecaleagle commented 7 years ago

I opened this issue under the wrong account, but if you consider looping the specifiers viable, I will go ahead and clean this up, write an iOS 6 compatible NSString extension method for stringByRemovingPercentEncoding, and follow the iOS call sequence when launching a nested panel via a URL to make the logic consistent with iOS' behavior, and issue a pull request.

akemin-dayo commented 7 years ago

Merged #24, though I haven't tested functionality yet, so not closing this issue (or pushing a binary release to the repo) yet.

fecaleagle commented 7 years ago

Yeah, of course. I'd like to see if I can prevent the need for a sharedInstance on the TweakSpecifiersController, but in any case, I'll see if I can refine it in the next couple of days. I'm hosting a fork on my repo, because I'm in beta on a tweak that basically depends on it, so I should have some feedback and testing hours shortly.

fecaleagle commented 7 years ago

Just figured out the way to really do this with InspectiveC. Much less readable to my eye, but it actually functions the way that the Preferences app does for nested specifiers. Doesn't require a sharedInstance of the TweakSpecifiersController or manipulating the nav stack. Will issue another pull request in the next day or so.

billybooth commented 7 years ago

After receiving feedback from users, the general perception was that doing it the more efficient way produced an undesirable visual animation. Happy with where things stand at this point.