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 Settings = require(Plugin.Settings)
local Theme = require(Plugin.App.Theme)
local PatchTree = require(Plugin.PatchTree)
local TextButton = require(Plugin.App.Components.TextButton)
@ -154,8 +153,7 @@ function ConfirmingPage:render()
onClick = self.props.onAbort,
}),
PullAll = if Settings:get("twoWaySync")
then e(TextButton, {
PullAll = e(TextButton, {
text = "Pull All",
style = "Danger",
transparency = self.props.transparency,
@ -163,8 +161,7 @@ function ConfirmingPage:render()
onClick = function()
self.setAllSelections("pull")
end,
})
else nil,
}),
SkipAll = e(TextButton, {
text = "Skip All",