Skip to content

Instantly share code, notes, and snippets.

@dmalinovsky
Created April 14, 2025 19:38
Show Gist options
  • Save dmalinovsky/93cb2a11ed0aee1e882a77bca949b40d to your computer and use it in GitHub Desktop.
Save dmalinovsky/93cb2a11ed0aee1e882a77bca949b40d to your computer and use it in GitHub Desktop.
Patch for KOReader to reload current book after making user hyphenation change
-- See https://github.com/koreader/koreader/issues/13462 for the details.
local ReaderUserHyph = require("apps/reader/modules/readeruserhyph")
ReaderUserHyph.loadUserDictionary = function(self, reload)
self:loadDictionary(self:isAvailable() and self:getDictionaryPath() or "", reload and true or false)
self.ui:handleEvent(Event:new("UpdatePos", reload))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment