Skip to content

Commit 9f15550

Browse files
committed
Change settings from statitics to highlightsync
1 parent dee05d6 commit 9f15550

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

highlightsync.koplugin/main.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,23 @@ local function write_json_file(path, data)
6464
return true
6565
end
6666

67-
Highlightsync.settings = G_reader_settings:readSetting("statistics")
6867

6968
function Highlightsync:onDispatcherRegisterActions()
7069
Dispatcher:registerAction("hightlightsync_action", {category="tool", event="Highlightsync", title=_("Highlight Sync"), general=true,})
7170
end
7271

72+
Highlightsync.default_settings = {
73+
is_enabled = true,
74+
}
75+
76+
7377

7478
function Highlightsync:init()
79+
if self.document and self.document.is_pic then
80+
return -- disable in PIC documents
81+
end
82+
83+
Highlightsync.settings = G_reader_settings:readSetting("highlight_sync", self.default_settings)
7584
self:onDispatcherRegisterActions(
7685
self.ui.menu:registerToMainMenu(self))
7786
end

0 commit comments

Comments
 (0)