Fix crash: use UIManager:close() instead of non-existent closeAllDialogs

This commit is contained in:
2026-05-29 22:36:08 -04:00
parent b2aff262e8
commit 517a8d3473
+7 -3
View File
@@ -511,9 +511,10 @@ function Bookhoard:startRegistration()
self.registration_id = result.registration_id
UIManager:show(InfoMessage:new{
self.waiting_dialog = InfoMessage:new{
text = T(_("Device registered on server.\n\nOpen your Bookhoard web UI and go to:\n%1/devices\n\nApprove this device in the \"Pending Device Registrations\" section.\n\nWaiting for approval…"), self.settings.server_url),
})
}
UIManager:show(self.waiting_dialog)
self:startRegistrationPoll()
end)
@@ -551,7 +552,10 @@ function Bookhoard:startRegistrationPoll()
self.settings.sync_endpoints = result.sync_endpoints
G_reader_settings:saveSetting(self.settings_key, self.settings)
self:registerEvents()
UIManager:closeAllDialogs()
if self.waiting_dialog then
UIManager:close(self.waiting_dialog)
self.waiting_dialog = nil
end
UIManager:show(InfoMessage:new{
text = _("Device registered successfully!"),
timeout = 3,