Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9e410d4

Browse files
committed
Merge branch 'master' into dev
2 parents e84e8c2 + a377a68 commit 9e410d4

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

lua/leetcode-ui/group/cases.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ function Cases:init(item, parent)
6161
local total = item.total_testcases ~= vim.NIL and item.total_testcases or 0
6262
for i = 1, total do
6363
self.cases[i] = Case({
64+
-- TODO: cache the testcases on submission,
65+
-- so it doesn't get out of sync
6466
input = self.console.testcase.testcases[i],
6567
output = item.code_answer[i],
6668
expected = item.expected_code_answer[i],

lua/leetcode-ui/popup/console/testcase.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function Testcase:populate()
2929
for i, case in ipairs(self.console.question.q.testcase_list) do
3030
if i ~= 1 then table.insert(tbl, "") end
3131

32+
-- TODO: Think of a better way to do this. Don't store testcases as a single strings
3233
table.insert(self.testcases, case:gsub("\n", " ")[1])
3334

3435
for s in vim.gsplit(case, "\n", { trimempty = true }) do

lua/leetcode/api/auth.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Auth.handle(res, err)
3131
local auth = res.data.userStatus
3232
err = {}
3333

34-
if auth.id == vim.NIL then
34+
if (not config.is_cn and auth.id == vim.NIL) or (config.is_cn and auth.slug == vim.NIL) then
3535
err.msg = "Session expired?"
3636
elseif not auth.is_signed_in then
3737
err.msg = "Sign-in failed"

lua/leetcode/translator.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local config = require("leetcode.config")
33
---@class lc.translate
44
local translate = {
55
["problems"] = "题库",
6-
["statistics"] = "统计学",
6+
["statistics"] = "统计",
77
["cookie"] = "Cookie",
88
["cache"] = "缓存",
99
["exit"] = "退出",

0 commit comments

Comments
 (0)