[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

This commit is contained in:
David
2025-01-31 09:55:55 +00:00
committed by GitHub
parent 7dc75d313c
commit 03500bc17e

View File

@@ -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,