mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[screenshoter] remove 'set as wallpaper' from devices with special offers (#13110)
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run
This commit is contained in:
@@ -96,16 +96,18 @@ function Screenshoter:onScreenshot(screenshot_name, caller_callback)
|
||||
UIManager:show(image_viewer)
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Set as wallpaper"),
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("screensaver_type", "document_cover")
|
||||
G_reader_settings:saveSetting("screensaver_document_cover", screenshot_name)
|
||||
dialog:onClose()
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
if Device:supportsScreensaver() then
|
||||
table.insert(buttons[2], {
|
||||
text = _("Set as wallpaper"),
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("screensaver_type", "document_cover")
|
||||
G_reader_settings:saveSetting("screensaver_document_cover", screenshot_name)
|
||||
dialog:onClose()
|
||||
end,
|
||||
})
|
||||
end
|
||||
dialog = ButtonDialog:new{
|
||||
title = _("Screenshot saved to:") .. "\n\n" .. BD.filepath(screenshot_name) .. "\n",
|
||||
modal = true,
|
||||
|
||||
Reference in New Issue
Block a user