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

Remove legacy #feed code.

This commit is contained in:
John Preston
2021-02-25 17:03:51 +04:00
parent df70fd3081
commit 8142acc709
71 changed files with 16 additions and 4139 deletions

View File

@@ -39,7 +39,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/storage_facade.h"
#include "storage/storage_shared_media.h"
#include "storage/storage_account.h"
//#include "storage/storage_feed_messages.h" // #feed
#include "support/support_helper.h"
#include "ui/image/image.h"
#include "ui/text/text_options.h"
@@ -159,13 +158,6 @@ void History::checkChatListMessageRemoved(not_null<HistoryItem*> item) {
}
setChatListMessageUnknown();
refreshChatListMessage();
//if (const auto channel = peer->asChannel()) { // #feed
// if (const auto feed = channel->feed()) {
// // Must be after history->chatListMessage() is updated.
// // Otherwise feed last message will be this value again.
// feed->messageRemoved(item);
// }
//}
}
void History::itemVanished(not_null<HistoryItem*> item) {
@@ -2165,26 +2157,11 @@ void History::setNotLoadedAtBottom() {
session().storage().invalidate(
Storage::SharedMediaInvalidateBottom(peer->id));
//if (const auto channel = peer->asChannel()) { // #feed
// if (const auto feed = channel->feed()) {
// session().storage().invalidate(
// Storage::FeedMessagesInvalidateBottom(
// feed->id()));
// }
//}
}
void History::clearSharedMedia() {
session().storage().remove(
Storage::SharedMediaRemoveAll(peer->id));
//if (const auto channel = peer->asChannel()) { // #feed
// if (const auto feed = channel->feed()) {
// session().storage().remove(
// Storage::FeedMessagesRemoveAll(
// feed->id(),
// channel->bareId()));
// }
//}
}
void History::setLastServerMessage(HistoryItem *item) {
@@ -2415,15 +2392,6 @@ bool History::lastServerMessageKnown() const {
void History::updateChatListExistence() {
Entry::updateChatListExistence();
//if (const auto channel = peer->asChannel()) { // #feed
// if (!channel->feed()) {
// // After ungrouping from a feed we need to load dialog.
// requestChatListMessage();
// if (!unreadCountKnown()) {
// owner().histories().requestDialogEntry(this);
// }
// }
//}
}
bool History::useTopPromotion() const {
@@ -2456,8 +2424,6 @@ bool History::shouldBeInChatList() const {
} else if (const auto channel = peer->asChannel()) {
if (!channel->amIn()) {
return isTopPromoted();
//} else if (const auto feed = channel->feed()) { // #feed
// return !feed->needUpdateInChatList();
}
} else if (const auto chat = peer->asChat()) {
return chat->amIn()
@@ -3077,12 +3043,6 @@ void History::clear(ClearType type) {
_loadedAtTop = _loadedAtBottom = _lastMessage.has_value();
clearSharedMedia();
clearLastKeyboard();
if (const auto channel = peer->asChannel()) {
//if (const auto feed = channel->feed()) { // #feed
// // Should be after resetting the _lastMessage.
// feed->historyCleared(this);
//}
}
}
if (const auto chat = peer->asChat()) {