Add basic progress indicator to character tooltips #852
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this requires #850 to be merged in. The diff includes changes from that PR. The only functional change is the one added file and the tweaks to RegisterTooltip.lua.
This adds a new indicator icon to the tooltip that appears if there's any outstanding data exchange queries currently in-progress for the displayed character.
The indicator icon itself shows as the last icon at the bottom-left of the tooltip, after the glance and unread about page icons.
Wow_OOvkgfrilA.mp4
The icon only shows if we're expecting profile data from the target player. Notably, this means we don't display an icon for the initial 'vernum' exchange. If the target player does not send us any data packets for ~about a minute, then the exchange is considered to be timed out and the icon will hide.
There's two reasons for not tracking vernum exchanges. Firstly, we send that query out a lot with a very small cooldown; this would result in the icon showing and hiding quite a lot and for very small periods of time if there's no actual new data to download. The second reason is MSP addons; those never reply to vernum exchanges and so the icon ends up staying visible until the query times out.
The bulk of this work is in the actual request tracking mechanism, as our comms protocol doesn't make it trivial to track the actual progress of any queries without breaking backwards compatibility. Ideally we'd be able to track the actual progress of queries, but unfortunately the stream identifier is embedded as part of the serialized message sent through Chomp, and in most cases ends up at the very end of each full message.