mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[UserList] Keep banner art when a params-less user copy arrives (#7173)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
21633eb0ec
commit
daa0dcb2ea
1 changed files with 6 additions and 2 deletions
|
|
@ -1372,9 +1372,13 @@ void UserListWidget::updateCardArtParams(const ServerInfo_User &user, const QStr
|
||||||
params.zoom = cap.zoom();
|
params.zoom = cap.zoom();
|
||||||
cardArtParamsMap.insert(userName, params);
|
cardArtParamsMap.insert(userName, params);
|
||||||
cardArtProvider->requestCardArt(userName, params.cardName, params.cardProviderId);
|
cardArtProvider->requestCardArt(userName, params.cardName, params.cardProviderId);
|
||||||
} else {
|
|
||||||
cardArtParamsMap.remove(userName); // clear stale params on removal
|
|
||||||
}
|
}
|
||||||
|
// Intentionally no removal branch: buddy/ignore list copies never carry
|
||||||
|
// card_art_params (the server omits the column), so a params-less copy here
|
||||||
|
// means "this snapshot doesn't include it", not "the banner was removed".
|
||||||
|
// Removing on such copies would wipe banners that the live online list set.
|
||||||
|
// The map is rebuilt from scratch (clear() + repopulate) on every rebuild,
|
||||||
|
// which is what actually drops stale entries.
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserListWidget::processUserInfo(const ServerInfo_User &user, bool online)
|
void UserListWidget::processUserInfo(const ServerInfo_User &user, bool online)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue