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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user