Skip to content

Commit

Permalink
v1.7.1 performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Serkan Yazıcıoğlu committed Oct 6, 2024
1 parent 338cec2 commit b9e1c3e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
20 changes: 4 additions & 16 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1480,10 +1480,7 @@ function Core:CheckEventInvites()

if (ns.UPCOMING_EVENTS.totalEvents) then
Core:ResetCalendar();

local hasAnyUninvitedEvent = false;
local canAddEvent = C_Calendar.CanAddEvent();
local currentCharacterInvite = GetCurrentCharacterUniqueKey();

for i = 1, ns.UPCOMING_EVENTS.totalEvents do
local upcomingEvent = ns.UPCOMING_EVENTS.events[i];
Expand All @@ -1501,18 +1498,8 @@ function Core:CheckEventInvites()
workQueue:clearTasks();
return;
elseif (eventIndex == -1) then
if (canAddEvent) then
if (upcomingEvent.calendarType == 1) then
hasAnyUninvitedEvent = true;
else
for m = 1, upcomingEvent.totalMembers do
local currentInviteMember = upcomingEvent.inviteMembers[m];
if (currentInviteMember and currentCharacterInvite == currentInviteMember.name .. "-" .. currentInviteMember.realmNormalized) then
hasAnyUninvitedEvent = true;
break;
end
end
end
if (upcomingEvent.isEventMember) then
hasAnyUninvitedEvent = true;
end
elseif (eventIndex > 0) then
Core:Debug(dayEvent.title .. " creator: " .. dayEvent.modStatus .. " eventIndex:" .. eventIndex);
Expand Down Expand Up @@ -1555,7 +1542,8 @@ function Core:CheckEventInvites()
if (containerFrame:IsShown()) then
Core:CreateUpcomingEvents();
else
if (GOW.DB.profile.warnNewEvents and hasAnyUninvitedEvent) then
local canAddEvent = C_Calendar.CanAddEvent();
if (GOW.DB.profile.warnNewEvents and canAddEvent and hasAnyUninvitedEvent) then
Core:OpenDialog("NEW_EVENT_FOUND");
end
end
Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW-Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for Classic Progression servers
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.7.0
## Version: 1.7.1
## SavedVariables: GoWDB
## IconTexture: Interface\Icons\vas_guildfactionchange

Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW-Classic.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for Classic Era servers
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.7.0
## Version: 1.7.1
## SavedVariables: GoWDB

embed.xml
Expand Down
2 changes: 1 addition & 1 deletion GuildsOfWoW.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Notes: Guilds of WoW guild herald for retail World of Warcraft
## X-Website: https://guildsofwow.com
## Author: Nhea
## Version: 1.7.0
## Version: 1.7.1
## SavedVariables: GoWDB
## OptionalDeps: AstralKeys
## AddonCompartmentFunc: GuildsOfWow_OnAddonButtonClick
Expand Down

0 comments on commit b9e1c3e

Please sign in to comment.