← 输入框|github.com|刷新
Skip to content

fix(clipboard): apply listener setting without restart and log unreadable clips (#911) - #915

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/clipboard-hardening
Nov 24, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/clipboard-hardening

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Hardening for #911 (clips copied while the keyboard is hidden missing from history). Partial: the likely cause is the system denying clipboard access in the background, which the app can't override; the new log lines show whether that happens.

  • Register or remove the clip change listener when the keyboard opens, so changing the clipboard listener setting takes effect without restarting the keyboard service. onDestroy reuses stopListening.
  • Log a warning when a clip change arrives but the clip can't be read.
  • ClipboardDao.clear reported 0 removed clips to the listener (counted after clearing); it now reports the real count.

Opening the keyboard still saves the current clip in both listener modes.

…able clips (#911)

Register or remove the clip change listener when the keyboard opens, so changing the setting takes effect without restarting the service. Log when a clip change can't be read, as some systems deny clipboard access while the keyboard is hidden. ClipboardDao.clear now reports the real number of removed clips.
@LeanBitLab
LeanBitLab merged commit e65e846 into main Nov 24, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/clipboard-hardening branch November 24, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant