Beispiel #1
0
void clearPeerCloudDraft(PeerId peerId) {
	auto history = App::history(peerId);

	history->clearCloudDraft();
	history->clearLocalDraft();

	history->updateChatListSortPosition();

	if (auto main = App::main()) {
		main->applyCloudDraft(history);
	}
}
Beispiel #2
0
void clearPeerCloudDraft(PeerId peerId, TimeId date) {
	const auto history = App::history(peerId);
	if (history->skipCloudDraft(QString(), MsgId(0), date)) {
		return;
	}

	history->clearCloudDraft();
	history->clearLocalDraft();

	if (Auth().supportMode()) {
		history->updateChatListEntry();
		Auth().supportHelper().cloudDraftChanged(history);
	} else {
		history->updateChatListSortPosition();
	}

	if (auto main = App::main()) {
		main->applyCloudDraft(history);
	}
}