Skip to content

Commit 96d2d7b

Browse files
authored
Fix automatically running character import on loading build, and show logout button in more cases (#1186)
* Fix Character Importer running automatically when opening a build * Fix logout button size and keep it visible in more instances
1 parent 13978a8 commit 96d2d7b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Classes/ImportTab.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
2929
return "^7Character import status: "..(type(self.charImportStatus) == "function" and self.charImportStatus() or self.charImportStatus)
3030
end)
3131

32-
self.controls.logoutApiButton = new("ButtonControl", {"TOPLEFT",self.controls.charImportStatusLabel,"TOPRIGHT"}, {4, 0, 200, 16}, "^7Logout from Path of Exile API", function()
32+
self.controls.logoutApiButton = new("ButtonControl", {"TOPLEFT",self.controls.charImportStatusLabel,"TOPRIGHT"}, {4, 0, 180, 16}, "^7Logout from Path of Exile API", function()
3333
main.lastToken = nil
3434
self.api.authToken = nil
3535
main.lastRefreshToken = nil
@@ -41,7 +41,7 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
4141
self.charImportStatus = colorCodes.WARNING.."Not authenticated"
4242
end)
4343
self.controls.logoutApiButton.shown = function()
44-
return self.charImportMode == "SELECTCHAR" and self.api.authToken ~= nil
44+
return (self.charImportMode == "SELECTCHAR" or self.charImportMode == "GETACCOUNTNAME") and self.api.authToken ~= nil
4545
end
4646

4747
self.controls.characterImportAnchor = new("Control", {"TOPLEFT",self.controls.sectionCharImport,"TOPLEFT"}, {6, 40, 200, 16})
@@ -337,7 +337,6 @@ local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(
337337
if self.charImportMode == "AUTHENTICATION" then
338338
self.charImportMode = "GETACCOUNTNAME"
339339
self.charImportStatus = "Authenticated"
340-
self:DownloadCharacterList()
341340
end
342341
if updateSettings then
343342
self:SaveApiSettings()

0 commit comments

Comments
 (0)