2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Show tdesktop cloud themes in a box.

This commit is contained in:
John Preston
2019-09-03 18:24:51 +03:00
parent 95afcbb485
commit ac8f924909
28 changed files with 684 additions and 192 deletions

View File

@@ -5407,23 +5407,6 @@ FileLoadTo ApiWrap::fileLoadTaskOptions(const SendAction &action) const {
return FileLoadTo(peer->id, action.options, action.replyTo);
}
void ApiWrap::requestSupportContact(FnMut<void(const MTPUser &)> callback) {
_supportContactCallbacks.push_back(std::move(callback));
if (_supportContactCallbacks.size() > 1) {
return;
}
request(MTPhelp_GetSupport(
)).done([=](const MTPhelp_Support &result) {
result.match([&](const MTPDhelp_support &data) {
for (auto &handler : base::take(_supportContactCallbacks)) {
handler(data.vuser());
}
});
}).fail([=](const RPCError &error) {
_supportContactCallbacks.clear();
}).send();
}
void ApiWrap::uploadPeerPhoto(not_null<PeerData*> peer, QImage &&image) {
peer = peer->migrateToOrMe();
const auto ready = PreparePeerPhoto(peer->id, std::move(image));