keyboard
keyboard copied to clipboard
qml: Don't break the emoji keyboard if LocalStorage fails
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.