From 70c55a42f03d0a5e3b119376b27772fee3dfb544 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Sat, 12 Oct 2024 23:07:05 +0200 Subject: [PATCH] Fix state mismanagement --- itemcontroller.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/itemcontroller.lua b/itemcontroller.lua index 861198d..e9a268b 100644 --- a/itemcontroller.lua +++ b/itemcontroller.lua @@ -582,7 +582,7 @@ local PAGES = { -- Set dynamic states for elements - sortButton:setText("<"..tostring(state.sortMode)..">") + sortButton:setText("<"..tostring(pageState.sortMode)..">") storageSatProgress:setProgress(1 - (emptyCount / totalCount)) local basePageIndex = (pageState.currentPage - 1) * groupEntryListBudget @@ -669,7 +669,7 @@ local PAGES = { keyboardButton:setOnClick(function() print("Toggling keyboard...") - state.showKeyboard = not state.showKeyboard + pageState.showKeyboard = not pageState.showKeyboard reloadState() return true @@ -693,7 +693,7 @@ local PAGES = { sortButton:setOnClick(function() print("Reorganizing...") - state.sortMode = (state.sortMode + 1 + #SORT_MODE) % #SORT_MODE + pageState.sortMode = (pageState.sortMode + 1 + #SORT_MODE) % #SORT_MODE reloadState() return true end)