Skip to content

Commit

Permalink
2.6.7
Browse files Browse the repository at this point in the history
Added Shift + Left Click to filter and minimap buttons to reset session data
fixed issue causing "You aren't in a party" spam in chat
  • Loading branch information
Noshei committed Oct 26, 2024
1 parent 2ef5d08 commit 25515ef
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Broker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function GT:InitializeBroker()
type = "launcher",
icon = "Interface\\Addons\\GatheringTracker\\Media\\GT_Icon",
OnClick = function(frame, button)
if button == "LeftButton" then
if button == "LeftButton" and IsShiftKeyDown() then
GT:ResetSession()
elseif button == "LeftButton" then
GT:GenerateFiltersMenu(frame)
elseif button == "RightButton" then
Settings.OpenToCategory(GT.metaData.name, true)
Expand Down
10 changes: 7 additions & 3 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ local generalOptions = {
miniMap = {
type = "toggle",
name = "Minimap Button",
desc = "Enable this to show the minimap button.\nLeft Click shows filters menu.\n" ..
"Right Click opens the addon options.",
desc = "Enable this to show the minimap button.\n" ..
"Left Click shows filters menu.\n" ..
"Right Click opens the addon options.\n" ..
"Shift + Left Click resets Session Data.",
width = 1.70,
get = function() return not GT.db.profile.miniMap.hide end,
set = function(_, key)
Expand All @@ -146,7 +148,9 @@ local generalOptions = {
filtersButton = {
type = "toggle",
name = "Filters Button",
desc = "Left Click shows filters menu.\nRight Click clears all filters.",
desc = "Left Click shows filters menu.\n" ..
"Right Click clears all filters.\n" ..
"Shift + Left Click resets Session Data.",
width = 1.70,
get = function() return GT.db.profile.General.filtersButton end,
set = function(_, key)
Expand Down
4 changes: 3 additions & 1 deletion FilterButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function GT:FiltersButton(profileChanged)
filterButton:Show()

filterButton:SetScript("OnClick", function(self, button, down)
if button == "LeftButton" then
if button == "LeftButton" and IsShiftKeyDown() then
GT:ResetSession()
elseif button == "LeftButton" then
GT:GenerateFiltersMenu(self)
elseif button == "RightButton" then
GT:ClearFilters()
Expand Down
4 changes: 2 additions & 2 deletions GatheringTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ function GT:InventoryUpdate(event, wait)
end

function GT:ProcessSoloData(event)
GT.Debug("ProcessSoloData", 2, event)
GT.Debug("ProcessSoloData", 1, event)
local itemTable = {}

for index, id in ipairs(GT.IDs) do
Expand Down Expand Up @@ -915,7 +915,7 @@ end
---@param event any calling function
---@param wait any if true we will wait a bit to avoid issues
function GT:CreateDataMessage(event, wait)
GT.Debug("CreateDataMessage", 2, event)
GT.Debug("CreateDataMessage", 1, event)
if wait then
GT:wait(0.1, "CreateDataMessage", "CreateDataMessage", false)
return
Expand Down
2 changes: 1 addition & 1 deletion GatheringTracker.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: Gathering Tracker
## Notes: Addon for tracking gathered items, supports solo players and groups
## Author: Noshei
## Version: 2.6.6
## Version: 2.6.7
## OptionalDeps: TradeSkillMaster, RECrystallize, Auctionator
## SavedVariables: GatheringTrackerDB
## AddonCompartmentFunc: GatheringTracker_OnAddonCompartmentClick
Expand Down
3 changes: 3 additions & 0 deletions Utilities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ function GT:IsInGroup()
if C_LFGInfo.IsInLFGFollowerDungeon() == true then
return false
end
if select(3, GetInstanceInfo()) == 208 then
return false
end
return IsInGroup()
end

Expand Down

0 comments on commit 25515ef

Please sign in to comment.