When I view the Premade Group individually, the Color Applications feature doesn't work.
yourapple opened this issue ยท 2 comments
As the title. It works fine after I modify the following code.
function PGF.ColorApplications(self, searchResultInfo)
if not self.NoSlotLeftBG then
local noSlotLeftBg = self:CreateTexture("NoSlotLeftBG", "BACKGROUND")
noSlotLeftBg:SetColorTexture(0.4, 0.0, 0.0, 1.0)
noSlotLeftBg:SetPoint("TOPLEFT", 3, -2)
noSlotLeftBg:SetPoint("BOTTOMRIGHT", -3, 0)
self.NoSlotLeftBG = noSlotLeftBg
end
self.NoSlotLeftBG:Hide()
if not PremadeGroupsFilterSettings.coloredApplications then return end
if searchResultInfo.isDelisted then return end
local activityInfo = C_LFGList.GetActivityInfoTable(searchResultInfo.activityID)
if not activityInfo.isMythicPlusActivity then return end
local _, appStatus, pendingStatus, appDuration = C_LFGList.GetApplicationInfo(self.resultID)
local isApplication = (appStatus ~= "none" or pendingStatus)
if isApplication then return end -- ######### CHANGED HERE ##########
local memberCounts = C_LFGList.GetSearchResultMemberCounts(self.resultID)
local hasRemainingSlots = PGF.HasRemainingSlotsForLocalPlayerPartyRoles(memberCounts)
if not hasRemainingSlots then
self.NoSlotLeftBG:Show()
end
end
The code works correct the way it is. The intention was to color the background in red only for groups you already applied to, not for all groups. The idea was to give players an indication if the group they already applied to has no more slots for their role because the group leader accepted like 3 DPS in the meantime and there is no slot left for me as a DPS (but there was when I signed up). This would block up one of the 5 possible pending applications.
It probably would make sense to color non-applied groups as well that do not match your party's composition. But in this case I would use a different name for the feature and a lighter color, as the red is very strong. Also, I am not sure if that is really needed because you just see if it matches your group, is sorted to bottom by default and can be filtered out using partyfit
.