Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qml: Don't break the emoji keyboard if LocalStorage fails #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pslldq
Copy link

@pslldq pslldq commented Nov 1, 2024

Some conditions (like missing access rights to create the database path) may lead the LocalStorage.openDatabaseSync call to fail. This causes the db variable to point to an undefined value, which breaks generating and displaying the list of emojis.

Instead of handling the failed database at every usage, simply provide a bare minimum dummy implementation that doesn't store anything and just returns empty query results. This allows the rest of the code to stay the same.

Some conditions (like missing access rights to create the database
path) may lead the LocalStorage.openDatabaseSync call to fail.
This causes the db variable to point to an undefined value, which
breaks generating and displaying the list of emojis.

Instead of handling the failed database at every usage, simply
provide a bare minimum dummy implementation that doesn't store anything
and just returns empty query results. This allows the rest of the code
to stay the same.
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