CommunityDKP

CommunityDKP

194k Downloads

Sorting method not always preserved when changing active team

Anonomit opened this issue ยท 2 comments

commented

Changing the current team sometimes (but not always) sorts the new team entries alphabetically, disregarding current sorting method. The sorting method is remembered (core.currentSort is not changed), which causes the order to reverse if the user selects the same sort type.

Reproduction steps:

  1. Reload UI
  2. Sort by DKP
  3. Change active team
  4. Change to previously active team
    (Note that sorting is now alphabetical)
  5. Sort by DKP
    (Note that sorting is now by reverse DKP)

I was able to fix this with a change in CommunityDKP.lua, after line 493:

CommDKP:SortDKPTable(core.currentSort);
CommDKP:SortDKPTable(core.currentSort);

I don't feel a performance difference with the extra sorting.

commented

Last sort id should be saved to the current DB as a setting, instead of running the sort table function wice.

commented

This an #25 should be done together.