My Attempt to fix layer channels taking low-numbered chat slots#95
My Attempt to fix layer channels taking low-numbered chat slots#95Jungleonly1740 wants to merge 1 commit intoiraizo:masterfrom
Conversation
This is an attempt to fix the issue where layer channels would take up low-numbered chat slots (like /3, /4) when the addon loads before WoW's default channels. The fix adds a simple check at the start of JoinLayerChannel() that waits for at least 2 channels to exist (typically General and Trade) before joining our layer channels. If fewer than 2 channels exist, the function retries after 2 seconds, up to a maximum of 2 retries. After 2 retries (approximately 4-6 seconds), the addon will proceed with creating channels anyway. This ensures the addon still works for players who have left all default channels. This approach avoids any manipulation of the player's channel setup and simply ensures our channels are created after the game's default channels are in place for the majority of players. Note: This is untested and may need adjustments.
|
This is making the assumption that the player has at least joined 2 channels, but we don't know that they did (they might just be in General or have chat disabled/left all channels altogether). Another problem with this issue is that we've been working under the assumption that people always want the layer channels to be the last ones in the channel list. But what if someone deliberately re-ordered it? Say 1 = General, 2 = layer, 3 = Trade? We can't really know for sure what the player's preference is. I think whatever approach we take, automatic re-ordering should be a toggle-able configuration that is disabled by default as to not mess up people's custom ordering. |
|
Fully agree, also i kept an eye on this and it did only occur once for me and did not reoccur even on a different account. So addressing this thing at all might do more harm than good and i think that at this point an adjustment is simply not needed |
This is an attempt to fix the issue where layer channels would take up low-numbered chat slots (like /3, /4) when the addon loads before WoW's default channels.
The fix adds a simple check at the start of JoinLayerChannel() that waits for at least 2 channels to exist (typically General and Trade) before joining our layer channels. If fewer than 2 channels exist, the function retries after 2 seconds, up to a maximum of 2 retries.
After 2 retries (approximately 4-6 seconds), the addon will proceed with creating channels anyway. This ensures the addon still works for players who have left all default channels.
This approach avoids any manipulation of the player's channel setup and simply ensures our channels are created after the game's default channels are in place for the majority of players.
Note: This is untested and may need adjustments.