2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Replace SelectedItemSet with MessageIdsList.

Use vector<FullMsgId> everywhere instead QMap<..,HistoryItem*>.
The old way the app crashed in case some messages were deleted.
If the items are needed use HistoryItemsList=vector<HistoryItem*>.
This commit is contained in:
John Preston
2017-12-06 14:13:38 +04:00
parent 3845985a6b
commit 6764a3cc86
25 changed files with 269 additions and 248 deletions

View File

@@ -35,6 +35,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "history/history_message.h"
#include "history/history_media_types.h"
#include "window/themes/window_theme_preview.h"
#include "window/window_peer_menu.h"
#include "base/task_queue.h"
#include "observer_peer.h"
#include "auth_session.h"
@@ -936,11 +937,7 @@ void MediaView::onForward() {
}
close();
if (auto main = App::main()) {
auto items = SelectedItemSet();
items.insert(item->id, item);
main->showForwardBox(std::move(items));
}
Window::ShowForwardMessagesBox({ 1, item->fullId() });
}
void MediaView::onDelete() {