| 1051 | } |
| 1052 | |
| 1053 | bool PeerData::changeColorCollectible( |
| 1054 | const tl::conditional<MTPPeerColor> &cloudColor) { |
| 1055 | if (!cloudColor) { |
| 1056 | return clearColorCollectible(); |
| 1057 | } |
| 1058 | return cloudColor->match([&](const MTPDpeerColorCollectible &data) { |
| 1059 | return changeColorCollectible(Data::ParseColorCollectible(data)); |
| 1060 | }, [&](const MTPDpeerColor &) { |
| 1061 | return clearColorCollectible(); |
| 1062 | }, [&](const MTPDinputPeerColorCollectible &) { |
| 1063 | return clearColorCollectible(); |
| 1064 | }); |
| 1065 | } |
| 1066 | |
| 1067 | bool PeerData::changeColor( |
| 1068 | const tl::conditional<MTPPeerColor> &cloudColor) { |
no test coverage detected