Update 2025-07-16

This commit is contained in:
2025-07-16 15:33:59 +03:00
parent 1a19d1112b
commit eb47813a34
20 changed files with 553 additions and 248 deletions

View File

@@ -7,7 +7,12 @@ local toggle_ui = ya.sync(function(self)
else
self.children = Modal:children_add(self, 10)
end
ya.render()
-- TODO: remove this
if ui.render then
ui.render()
else
ya.render()
end
end)
local subscribe = ya.sync(function(self)
@@ -18,7 +23,12 @@ end)
local update_partitions = ya.sync(function(self, partitions)
self.partitions = partitions
self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1))
ya.render()
-- TODO: remove this
if ui.render then
ui.render()
else
ya.render()
end
end)
local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end)
@@ -29,7 +39,12 @@ local update_cursor = ya.sync(function(self, cursor)
else
self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1)
end
ya.render()
-- TODO: remove this
if ui.render then
ui.render()
else
ya.render()
end
end)
local M = {