feat(koplugin): support deletePluginSettings hook (#4045)

Implements the hook introduced by koreader/koreader#15240, called when
the user deletes the plugin via the plugin manager with "Also delete
plugin settings" checked. Removes the readest_sync entry from
G_reader_settings (auth tokens, user info, auto_sync flag, last_sync_at)
and resets the in-memory copy to defaults.

Closes #4039

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Huang Xin
2026-05-03 22:31:02 +08:00
committed by GitHub
parent f5657fb3a0
commit e0fa6230ab
+6
View File
@@ -381,4 +381,10 @@ function ReadestSync:onCloseWidget()
end
end
function ReadestSync:deletePluginSettings()
G_reader_settings:delSetting("readest_sync")
self.settings = self.default_settings
return true
end
return ReadestSync