Fixing inactivity filter together with sales/tickets

Leandro Silva [09-21-18 - 21:08]
Fixing inactivity filter together with sales/tickets
Filename
LeoGuildManager.lua
LeoGuildManager.txt
LeoGuildManagerUI.lua
diff --git a/LeoGuildManager.lua b/LeoGuildManager.lua
index 6c54067..2f90d29 100644
--- a/LeoGuildManager.lua
+++ b/LeoGuildManager.lua
@@ -2,7 +2,7 @@
 LeoGM = {}
 LeoGM.name = "LeoGuildManager"
 LeoGM.displayName = "Leo's Guild Manager"
-LeoGM.version = "0.9.1"
+LeoGM.version = "0.9.2"
 LeoGM.chatPrefix = "|c39B027" .. LeoGM.name .. "|r: "
 LeoGM.panelList = { "Rules", "Purge" }
 LeoGM.members = {}
diff --git a/LeoGuildManager.txt b/LeoGuildManager.txt
index 2e08bbb..e1e1243 100644
--- a/LeoGuildManager.txt
+++ b/LeoGuildManager.txt
@@ -1,6 +1,6 @@
 ## Title: Leo's Guild Manager
 ## APIVersion: 100024
-## Version: 0.9.1
+## Version: 0.9.2
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoGMSavedVariables
 ## DependsOn: LibStub LibFeedback MasterMerchant
diff --git a/LeoGuildManagerUI.lua b/LeoGuildManagerUI.lua
index 8eb41a3..d35c2f8 100644
--- a/LeoGuildManagerUI.lua
+++ b/LeoGuildManagerUI.lua
@@ -83,17 +83,19 @@ function LeoGMMemberList:FilterScrollList()
     for i = 1, #self.masterList do
         local data = self.masterList[i]
         local canAdd = true
-        if LeoGM.selectedRank and data.rankIndex <= LeoGM.selectedRank then
-            canAdd = false
-        elseif offlineThreshold > 0 and data.online > offlineThreshold then
-            canAdd = true
-        elseif salesThreshold > 0 and ticketsThreshold > 0 and ( data.sales >= salesThreshold or data.deposits >= ticketsThreshold ) then
+        if salesThreshold > 0 and ticketsThreshold > 0 and ( data.sales >= salesThreshold or data.deposits >= ticketsThreshold ) then
             canAdd = false
         elseif salesThreshold > 0 and data.sales >= salesThreshold then
             canAdd = false
         elseif ticketsThreshold > 0 and data.deposits >= ticketsThreshold then
             canAdd = false
         end
+        if not canAdd and offlineThreshold > 0 and data.online > offlineThreshold then
+            canAdd = true
+        end
+        if canAdd and LeoGM.selectedRank and data.rankIndex <= LeoGM.selectedRank then
+            canAdd = false
+        end
         if canAdd then
             table.insert(scrollData, ZO_ScrollList_CreateDataEntry(1, data))
         end