This commit is contained in:
2025-11-10 15:38:30 +08:00
parent 97316c7989
commit 1cdc17b710
18 changed files with 337 additions and 20 deletions

View File

@@ -234,7 +234,7 @@ static CGFloat KEYBOARDHEIGHT = 256 + 20;
// 使 App Scheme
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@@//login?src=keyboard", KB_APP_SCHEME]];
if (!url) return;
__weak typeof(self) weakSelf = self;
KBWeakSelf
[self.extensionContext openURL:url completionHandler:^(__unused BOOL success) {
// 使
__unused typeof(weakSelf) selfStrong = weakSelf;

View File

@@ -259,7 +259,7 @@ static NSString * const kKBFunctionTagCellId = @"KBFunctionTagCellId";
// 访宿/
if (![[KBFullAccessManager shared] hasFullAccess]) return;
if (self.pasteboardTimer) return;
__weak typeof(self) weakSelf = self;
KBWeakSelf
self.pasteboardTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 repeats:YES block:^(NSTimer * _Nonnull timer) {
__strong typeof(weakSelf) self = weakSelf; if (!self) return;
UIPasteboard *pb = [UIPasteboard generalPasteboard];

View File

@@ -338,7 +338,6 @@
if (before.length <= 0) { self.backspaceHoldActive = NO; return; }
[proxy deleteBackward]; // 1
// 使 NSTimer
__weak typeof(self) weakSelf = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.06 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
__strong typeof(weakSelf) selfStrong = weakSelf;