fix: toggle can be run even if disconnected

This commit is contained in:
əlemi 2024-09-05 05:28:48 +02:00
parent 85f5a634b8
commit e47d7317c4
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -19,6 +19,10 @@ end
-- always available -- always available
local base_actions = { local base_actions = {
toggle = function()
window.toggle()
end,
connect = function(host) connect = function(host)
client.connect(host) client.connect(host)
end, end,
@ -30,10 +34,6 @@ local connected_actions = {
print("> codemp::" .. session.client.id) print("> codemp::" .. session.client.id)
end, end,
toggle = function()
window.toggle()
end,
join = function(ws) join = function(ws)
if ws == nil then error("missing workspace name") end if ws == nil then error("missing workspace name") end
workspace.join(ws) workspace.join(ws)