Skip to content

feat: Implement emoji autosuggestion and refactor key handling - #671

Open
Roniscend wants to merge 2 commits into
scribe-org:mainfrom
Roniscend:emoji-suggestion
Open

feat: Implement emoji autosuggestion and refactor key handling#671
Roniscend wants to merge 2 commits into
scribe-org:mainfrom
Roniscend:emoji-suggestion

Conversation

@Roniscend

@Roniscend Roniscend commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Implemented emoji autosuggestion functionality and refactored keyboard key handling
Fixes : #637
WhatsApp Image 2026-08-10 at 23 41 40

Signed-off-by: Owm <owmdubey163@gmail.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes missing emoji autosuggestions by making emoji keyword loading more tolerant to schema/table-name differences and by normalizing keyword casing for lookup, while also refactoring IME key handling to be centralized in GeneralKeyboardIME via KeyHandler instead of per-language overrides.

Changes:

  • Hardened emoji keyword DB loading (supports both emoji_keywords and emojikeywords; normalizes keyword casing).
  • Centralized key handling by delegating onKey() in GeneralKeyboardIME to KeyHandler, removing duplicated overrides in individual language IMEs.
  • Adjusted suggestion state handling so emoji autosuggestion state is cleared when no match is found, and emoji suggestions can be shown when autocomplete completions are empty.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/src/main/java/be/scri/helpers/data/SQLiteExtensions.kt Makes tableExists safer by using a parameterized query and case-insensitive matching.
app/src/main/java/be/scri/helpers/data/EmojiDataManager.kt Loads emoji keywords from either legacy or current table name and normalizes keyword keys for lookup.
app/src/keyboards/java/be/scri/services/GeneralKeyboardIME.kt Initializes and delegates key handling to KeyHandler; updates emoji autosuggestion behavior when autocomplete has no completions.
app/src/keyboards/java/be/scri/helpers/SuggestionHandler.kt Clears autoSuggestEmojis when no emoji suggestion is available to avoid stale state.
app/src/keyboards/java/be/scri/services/SwedishKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/SpanishKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/RussianKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/PortugueseKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/ItalianKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/GermanKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/FrenchKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.
app/src/keyboards/java/be/scri/services/EnglishKeyboardIME.kt Removes per-language KeyHandler/onKey override in favor of base handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/src/main/java/be/scri/helpers/data/EmojiDataManager.kt
# Conflicts:
#	app/src/keyboards/java/be/scri/services/GeneralKeyboardIME.kt
@Roniscend

Copy link
Copy Markdown
Collaborator Author

@angrezichatterbox PTAL
Thanks
CC: @andrewtavis

@andrewtavis

Copy link
Copy Markdown
Member

Thanks for the PR, @Roniscend :) What's the plan here? Do we need to merge this before #660, or does this supersede it?

@Roniscend

Copy link
Copy Markdown
Collaborator Author

Thanks for the PR, @Roniscend :) What's the plan here? Do we need to merge this before #660, or does this supersede it?

Yes, this PR specifically addresses the emoji autosuggestion and key handling fixes from #637

@andrewtavis

Copy link
Copy Markdown
Member

Perfect! Really great to have this in :)

@andrewtavis andrewtavis added the -next release- Included in the next release label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-next release- Included in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emoji suggestions are not shown for matching keywords

3 participants