mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Alpha 1.0.10: unpinning converted chat on demand.
If we want to pin a chat and we have reached the limit we now check for a deactivated (converted to supergroup) chat that is pinned and is not in the chats list and just silently unpin it if it is found. Also possible UB fix for a waveform encoding and decoding.
This commit is contained in:
@@ -643,17 +643,12 @@ void DialogsInner::savePinnedOrder() {
|
||||
if (newOrder.size() != _pinnedOrder.size()) {
|
||||
return; // Something has changed in the set of pinned chats.
|
||||
}
|
||||
|
||||
auto peers = QVector<MTPInputPeer>();
|
||||
peers.reserve(newOrder.size());
|
||||
for_const (auto history, newOrder) {
|
||||
if (_pinnedOrder.indexOf(history) < 0) {
|
||||
return; // Something has changed in the set of pinned chats.
|
||||
}
|
||||
peers.push_back(history->peer->input);
|
||||
}
|
||||
auto flags = MTPmessages_ReorderPinnedDialogs::Flag::f_force;
|
||||
MTP::send(MTPmessages_ReorderPinnedDialogs(MTP_flags(qFlags(flags)), MTP_vector(peers)));
|
||||
App::histories().savePinnedToServer();
|
||||
}
|
||||
|
||||
void DialogsInner::finishReorderPinned() {
|
||||
|
Reference in New Issue
Block a user