Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling sethiddenkeys from within kIASKAppSettingChanged call crashes app #485

Open
mournblade opened this issue Oct 10, 2023 · 1 comment

Comments

@mournblade
Copy link

I had an old issue with this that seems to be back for me.
(old issue): #289

consider this method:

  • (void)updateVisibilityItems {
    NSMutableSet *set = CacheHandler.cache.isAdminOrManager ? [NSMutableSet set] : [NSMutableSet setWithArray:@[@"push_notifications", @"com.a.STATUS", @"accAlarmNot", @"accAlarmNotHeader", @"accEmail", @"accEmailHeader"]];

    if (([prefs getCheckingInGeofenceActionType] == OFF)) {
    [set addObject:@"geoChangePolicyGrp"];
    }
    [self setHiddenKeys:set animated:true];//CRASHES IF FALSE
    DebugLog(@"updateVisibilityItems");
    }

if I call this when my kIASKAppSettingChanged observer method is called, it crashes if animated is false. Version 3.4

The error I get is:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in the table view before the update (2), plus or minus the number of sections inserted or deleted (0 inserted, 0 deleted).

@futuretap
Copy link
Owner

Can you provide a demo project exhibiting the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants