add simple sync service as a plugin

The 'KOSync' plugin will synchronize furthest reading progress
across different koreader devices after users registering their
devices.

The synchronizing service is open-sourced as the project
[koreader/koreader-sync-server](https://github.com/koreader/koreader-sync-server).
This commit is contained in:
chrox
2015-03-09 20:20:32 +08:00
parent 9ab6224963
commit d08e22ec2e
11 changed files with 702 additions and 53 deletions

View File

@@ -368,7 +368,8 @@ function ReaderUI:closeDocument()
self.document = nil
end
function ReaderUI:onCloseDocument()
function ReaderUI:notifyCloseDocument()
self:handleEvent(Event:new("CloseDocument"))
if self.document:isEdited() then
UIManager:show(ConfirmBox:new{
text = _("Do you want to save this document?"),
@@ -392,7 +393,7 @@ function ReaderUI:onClose()
self:saveSettings()
if self.document ~= nil then
DEBUG("closing document")
self:onCloseDocument()
self:notifyCloseDocument()
end
UIManager:close(self.dialog, "full")
-- serialize last used items for later launch