You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not to be confused with #27 that's a separate issue.
This isn't really so much a bug as a limitation/flaw in the existing code. I do not expect this to be fixed as such, but I am making an issue for it in case I ever have to go back to this topic.
This is relevant for classic pages and legacy live only.
In the lineup details page, match-lineup-tweaks does not display faces or specialties for players who are no longer in the team, but technically it is possible to do this (unless the player has been fired.)
runMissing functions as expected - if a player on the field is missing from the CHPP PlayerList a little 'missing' icon is added below the player.
runSpecialties actually has code to detect players missing from the CHPP PlayerList and make a CHPP call to get those player's individual data, but this never executes because of a flaw in Player.getPlayer.
wasFired only makes sense on a player or playerlist page. On the match or live view this will always return true. If the call to wasFired is removed from getPlayer the specialty icons do indeed appear for 'missing' players.
runFaces simply ignores 'missing' players, but it could be made to work. However CHPP makes this a little awkward as player avatars are retreived at a team level rather than from the individual player. For each missing player it would require two CHPP calls; one to playerdetails to determine the player's team, and then a second to avatars to retreive the player's face. This is a lot of CHPP for such a minor feature.
The text was updated successfully, but these errors were encountered:
Not to be confused with #27 that's a separate issue.
This isn't really so much a bug as a limitation/flaw in the existing code. I do not expect this to be fixed as such, but I am making an issue for it in case I ever have to go back to this topic.
This is relevant for classic pages and legacy live only.
In the lineup details page, match-lineup-tweaks does not display faces or specialties for players who are no longer in the team, but technically it is possible to do this (unless the player has been fired.)
The relevant function calls:
foxtrick/content/matches/match-lineup-tweaks.js
Lines 1368 to 1376 in d43d906
runMissing functions as expected - if a player on the field is missing from the CHPP PlayerList a little 'missing' icon is added below the player.
runSpecialties actually has code to detect players missing from the CHPP PlayerList and make a CHPP call to get those player's individual data, but this never executes because of a flaw in Player.getPlayer.
foxtrick/content/pages/player.js
Lines 1087 to 1090 in d43d906
foxtrick/content/pages/player.js
Lines 1074 to 1078 in d43d906
wasFired only makes sense on a player or playerlist page. On the match or live view this will always return true. If the call to wasFired is removed from getPlayer the specialty icons do indeed appear for 'missing' players.
runFaces simply ignores 'missing' players, but it could be made to work. However CHPP makes this a little awkward as player avatars are retreived at a team level rather than from the individual player. For each missing player it would require two CHPP calls; one to playerdetails to determine the player's team, and then a second to avatars to retreive the player's face. This is a lot of CHPP for such a minor feature.
The text was updated successfully, but these errors were encountered: