minor fix

This commit is contained in:
TrueZhuanjia
2025-10-15 22:15:07 +08:00
parent f8e14006c1
commit 58f534fcc8
+5 -1
View File
@@ -128,6 +128,10 @@ static BOOL overridePersistedFoldState = YES;
// 布局
[self setupConstraints];
[self updateViewForFoldState];
self.lockedSectionHandler = ^{
NSLog(@"Null execution of lockedSectionHandler");
};
}
- (void)setupConstraints {
@@ -324,7 +328,7 @@ static BOOL overridePersistedFoldState = YES;
- (void)toggleFold {
self.isExpanded = !_expandable ? false : !self.isExpanded;
if(!_expandable) self.lockedSectionHandler();
if(!_expandable && self.lockedSectionHandler) self.lockedSectionHandler();
[self updateViewForFoldState];
[[NSUserDefaults standardUserDefaults] setBool:self.isExpanded forKey:self.identifier];
[[NSUserDefaults standardUserDefaults] synchronize];