@ -1,5 +1,6 @@
local DataStorage = require ( " datastorage " )
local DocSettings = require ( " frontend/docsettings " )
local DocSettings = require ( " docsettings " )
local Event = require ( " ui/event " )
local FFIUtil = require ( " ffi/util " )
local FileManager = require ( " apps/filemanager/filemanager " )
local InfoMessage = require ( " ui/widget/infomessage " )
@ -85,12 +86,7 @@ function Wallabag:addToMainMenu(menu_items)
{
text = _ ( " Retrieve new articles from server " ) ,
callback = function ( )
if not NetworkMgr : isOnline ( ) then
NetworkMgr : promptWifiOn ( )
return
end
self : synchronise ( )
self : refreshCurrentDirIfNeeded ( )
self.ui : handleEvent ( Event : new ( " SynchronizeWallabag " ) )
end ,
} ,
{
@ -188,7 +184,7 @@ function Wallabag:addToMainMenu(menu_items)
end ,
} ,
{
text = _ ( " Synchroni s e remotely deleted files" ) ,
text = _ ( " Synchroni z e remotely deleted files" ) ,
checked_func = function ( ) return self.is_sync_remote_delete end ,
callback = function ( )
self.is_sync_remote_delete = not self.is_sync_remote_delete
@ -204,7 +200,7 @@ function Wallabag:addToMainMenu(menu_items)
Articles marked as finished or 100 % read can be deleted from the server . Those articles can also be deleted automatically when downloading new articles if the ' Process deletions during download ' option is enabled .
The ' Synchroni s e remotely deleted files' option will remove local files that no longer exist on the server . ] ] )
The ' Synchroni z e remotely deleted files' option will remove local files that no longer exist on the server . ] ] )
} )
end ,
}
@ -215,7 +211,7 @@ The 'Synchronise remotely deleted files' option will remove local files that no
keep_menu_open = true ,
callback = function ( )
UIManager : show ( InfoMessage : new {
text = T ( _ ( [ [ Wallabag is an open source read - it - later service . This plugin synchroni s es with a Wallabag server .
text = T ( _ ( [ [ Wallabag is an open source read - it - later service . This plugin synchroni z es with a Wallabag server .
More details : https : // wallabag.org
@ -403,7 +399,7 @@ function Wallabag:callAPI( method, apiurl, headers, body, filepath )
end
end
function Wallabag : synchroni s e( )
function Wallabag : synchroni z e( )
local info = InfoMessage : new { text = _ ( " Connecting… " ) }
UIManager : show ( info )
UIManager : forceRePaint ( )
@ -442,7 +438,7 @@ function Wallabag:synchronise()
failed_count = failed_count + 1
end
end
-- synchroni s e remote deletions
-- synchroni z e remote deletions
deleted_count = deleted_count + self : processRemoteDeletes ( remote_article_ids )
local msg
@ -730,4 +726,13 @@ function Wallabag:saveWBSettings(setting)
self.wb_settings : flush ( )
end
function Wallabag : onSynchronizeWallabag ( )
if not NetworkMgr : isOnline ( ) then
NetworkMgr : promptWifiOn ( )
return
end
self : synchronize ( )
self : refreshCurrentDirIfNeeded ( )
end
return Wallabag