From 58f534fcc814f417a18185e4d8d6ba329f8d5d9a Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Wed, 15 Oct 2025 22:15:07 +0800 Subject: [PATCH] minor fix --- VoidLink/MenuSectionView.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VoidLink/MenuSectionView.m b/VoidLink/MenuSectionView.m index 21f83650..1e73f3e9 100644 --- a/VoidLink/MenuSectionView.m +++ b/VoidLink/MenuSectionView.m @@ -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];