From 3bba47b2416669ee3565f21e08a059cd1f0ea4c5 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 15 May 2014 17:53:56 +0800 Subject: [PATCH] fix domain in login/logout menu not changed after switching domain --- plugins/evernote.koplugin/main.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/evernote.koplugin/main.lua b/plugins/evernote.koplugin/main.lua index 29f06d8c9..aa95d49ff 100644 --- a/plugins/evernote.koplugin/main.lua +++ b/plugins/evernote.koplugin/main.lua @@ -38,19 +38,19 @@ function EvernoteExporter:init() end function EvernoteExporter:addToMainMenu(tab_item_table) - local domain = nil - if self.evernote_domain == "sandbox" then - domain = _("Sandbox") - elseif self.evernote_domain == "yinxiang" then - domain = _("Yinxiang") - else - domain = _("Evernote") - end table.insert(tab_item_table.plugins, { text = _("Evernote"), sub_item_table = { { text_func = function() + local domain = nil + if self.evernote_domain == "sandbox" then + domain = _("Sandbox") + elseif self.evernote_domain == "yinxiang" then + domain = _("Yinxiang") + else + domain = _("Evernote") + end return self.evernote_token and (_("Logout") .. " " .. domain) or _("Login") end,