Skip to content

Commit

Permalink
Remove new state on setting after viewing
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Oct 6, 2024
1 parent 9d46033 commit cf03051
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ local function registerSetting(category, savedvariable, info)
return
end

if info.new then
if info.new and not _G[savedvariable][info.key .. '_seen'] then
EventRegistry:RegisterCallback('Settings.CategoryChanged', function(_, cat)

Check warning on line 188 in modules/settings.lua

View workflow job for this annotation

GitHub Actions / lint

accessing undefined variable 'EventRegistry'
if cat == category then
_G[savedvariable][info.key .. '_seen'] = true
end
end)

-- possibly tainty, and not that clean (it adds new tag to the category list too)
local version = GetBuildInfo()
if not NewSettings[version] then
Expand Down

0 comments on commit cf03051

Please sign in to comment.