mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Improve sync info (#692)
- Fixed an edge case where disconnecting and then reconnecting would retain outdated info - Fixed an issue where new patches wouldn't immediately update the change info text - Removed extraneous changes count info, as it was not useful and could be checked in the visualizer anyway - Added warning info for when some changes fail to apply - Updates timestamp of last sync even if patch was empty, to have a more accurate signal on Rojo's uptime
This commit is contained in:
parent
ce530e795a
commit
fde78738b6
4 changed files with 121 additions and 46 deletions
|
|
@ -212,13 +212,24 @@ function PatchSet.countChanges(patch)
|
|||
local count = 0
|
||||
|
||||
for _ in patch.added do
|
||||
-- Adding an instance is 1 change
|
||||
count += 1
|
||||
end
|
||||
for _ in patch.removed do
|
||||
-- Removing an instance is 1 change
|
||||
count += 1
|
||||
end
|
||||
for _ in patch.updated do
|
||||
count += 1
|
||||
for _, update in patch.updated do
|
||||
-- Updating an instance is 1 change per property updated
|
||||
for _ in update.changedProperties do
|
||||
count += 1
|
||||
end
|
||||
if update.changedName ~= nil then
|
||||
count += 1
|
||||
end
|
||||
if update.changedClassName ~= nil then
|
||||
count += 1
|
||||
end
|
||||
end
|
||||
|
||||
return count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue