Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Improve Blocked Words UX and Real-Time Engine Filtering

未关闭
#387 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
android, kotlin
领域
mobile-dev

调研方向

Start by tracing the suggestion-chip long-press and delete-state handling, including the postDelayed timeout and DICTIONARY_USER_TYPED restriction. Then read the engine's raw-input filtering and dictionary reload paths, along with how blacklist .txt files are loaded. Done means only one word's delete control is active until dismissed, typed words can be blacklisted, and blacklisted words are suppressed from both raw input and suggestions.

由索引模型根据 Issue 内容生成。

描述

enhancement
Current Limitations
  1. UX Constraints: The delete (bin) icon on suggestion chips disappears automatically after a 3-second timeout (postDelayed), and it is completely disabled for raw user-typed words (DICTIONARY_USER_TYPED).
  2. Real-time Filtering: Blacklisted words can still appear during active typing because the filter only applies to dictionary suggestions, not the raw input stream.
Proposed Solutions
1. UI & State Management Improvements
  • Remove the 3-second timeout (postDelayed). Ensure that only one word can be in delete mode at a time—long-pressing a new word must instantly clear the bin icon from the previous word. Let the delete state persist until the user taps the bin or interacts elsewhere.
  • Track a single active delete view state so long-pressing a new word automatically resets the previous one.
  • Remove the restriction on DICTIONARY_USER_TYPED so users can delete and blacklist any word they type.
2. Engine-Level Filtering with Zero Performance Impact (Caching)
  • To prevent heavy file I/O or lag on every keystroke, load the blacklist .txt files into an in-memory HashSet upon initialization or dictionary reload.
  • Perform real-time checks against this in-memory Set (microseconds lookup time). This ensures blacklisted words are completely suppressed from both raw typing and suggestions without adding any performance overhead or lag to the core engine.
主要语言
Kotlin
星标
1k
派生
59
平均合并
13 小时 11 分钟
30 天内合并 PR
47

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LeanBitLab/LeanType 的其他 Issue

查看 LeanBitLab/LeanType 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。