Made clicking the message on the StatusView open a LogView

This commit is contained in:
rxi 2020-05-12 14:44:29 +01:00
parent 23cf193026
commit 7f6a2710ef

View file

@ -1,8 +1,10 @@
local core = require "core"
local common = require "core.common"
local command = require "core.command"
local config = require "core.config"
local style = require "core.style"
local DocView = require "core.docview"
local LogView = require "core.logview"
local View = require "core.view"
@ -20,6 +22,14 @@ function StatusView:new()
end
function StatusView:on_mouse_pressed()
if system.get_time() < self.message_timeout
and not core.active_view:is(LogView) then
command.perform "core:open-log"
end
end
function StatusView:show_message(icon, icon_color, text)
self.message = {
icon_color, style.icon_font, icon,