Refactor PullAll button logic in Confirming.lua for improved readability

- Removed conditional rendering of the PullAll button based on settings and simplified its implementation.
- Enhanced the overall structure of the button definition for better clarity in the ConfirmingPage render function.
This commit is contained in:
Joe 2026-01-30 11:18:00 -06:00
parent 0b243b4ca9
commit 240c225be0

View file

@ -4,7 +4,6 @@ local Packages = Rojo.Packages
local Roact = require(Packages.Roact) local Roact = require(Packages.Roact)
local Settings = require(Plugin.Settings)
local Theme = require(Plugin.App.Theme) local Theme = require(Plugin.App.Theme)
local PatchTree = require(Plugin.PatchTree) local PatchTree = require(Plugin.PatchTree)
local TextButton = require(Plugin.App.Components.TextButton) local TextButton = require(Plugin.App.Components.TextButton)
@ -154,17 +153,15 @@ function ConfirmingPage:render()
onClick = self.props.onAbort, onClick = self.props.onAbort,
}), }),
PullAll = if Settings:get("twoWaySync") PullAll = e(TextButton, {
then e(TextButton, { text = "Pull All",
text = "Pull All", style = "Danger",
style = "Danger", transparency = self.props.transparency,
transparency = self.props.transparency, layoutOrder = 2,
layoutOrder = 2, onClick = function()
onClick = function() self.setAllSelections("pull")
self.setAllSelections("pull") end,
end, }),
})
else nil,
SkipAll = e(TextButton, { SkipAll = e(TextButton, {
text = "Skip All", text = "Skip All",