fix(koplugin): fixed koreader crash on logout, closes #3598 (#3603)

This commit is contained in:
Huang Xin
2026-03-23 22:08:51 +08:00
committed by GitHub
parent 1e942a23b4
commit 64675820f1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ function ReadestSync:addToMainMenu(menu_items)
end
else
return function(menu)
SyncAuth:logout(self.settings, menu)
SyncAuth:logout(self.settings, self.path, menu)
end
end
end,
@@ -221,7 +221,7 @@ function ReadestSync:pullBookConfig(interactive)
SyncConfig:pull(
self.ui, self.settings, client, book_hash, meta_hash, interactive,
function() SyncAuth:logout(self.settings) end
function() SyncAuth:logout(self.settings, self.path) end
)
end
+2 -2
View File
@@ -152,9 +152,9 @@ function SyncAuth:doLogin(settings, path, email, password, menu)
end
end
function SyncAuth:logout(settings, menu)
function SyncAuth:logout(settings, path, menu)
if settings.access_token then
local client = self:getSupabaseAuthClient(settings, "")
local client = self:getSupabaseAuthClient(settings, path)
if client then
client:sign_out(settings.access_token, function(success, _response)
logger.dbg("ReadestSync: Sign out result:", success)