2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05: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

@@ -218,7 +218,6 @@ enum class Flag {
SavedMessages = 0x08,
RepliesMessages = 0x10,
AllowUserOnline = 0x20,
//FeedSearchResult = 0x10, // #feed
};
inline constexpr bool is_flag_type(Flag) { return true; }
@@ -317,7 +316,7 @@ void paintRow(
st::msgNameFont->height);
const auto promoted = (history && history->useTopPromotion())
&& !(flags & (Flag::SearchResult/* | Flag::FeedSearchResult*/)); // #feed
&& !(flags & Flag::SearchResult);
if (promoted) {
const auto type = history->topPromotionType();
const auto custom = type.isEmpty()
@@ -329,16 +328,11 @@ void paintRow(
? tr::lng_badge_psa_default(tr::now)
: custom;
PaintRowTopRight(p, text, rectForName, active, selected);
} else if (from/* && !(flags & Flag::FeedSearchResult)*/) { // #feed
} else if (from) {
if (const auto chatTypeIcon = ChatTypeIcon(from, active, selected)) {
chatTypeIcon->paint(p, rectForName.topLeft(), fullWidth);
rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip);
}
//} else if (const auto feed = chat.feed()) { // #feed
// if (const auto feedTypeIcon = FeedTypeIcon(feed, active, selected)) {
// feedTypeIcon->paint(p, rectForName.topLeft(), fullWidth);
// rectForName.setLeft(rectForName.left() + st::dialogsChatTypeSkip);
// }
}
auto texttop = st::dialogsPadding.y()
+ st::msgNameFont->height
@@ -574,14 +568,6 @@ const style::icon *ChatTypeIcon(
return nullptr;
}
//const style::icon *FeedTypeIcon( // #feed
// not_null<Data::Feed*> feed,
// bool active,
// bool selected) {
// return &(active ? st::dialogsFeedIconActive
// : (selected ? st::dialogsFeedIconOver : st::dialogsFeedIcon));
//}
//
void paintUnreadBadge(Painter &p, const QRect &rect, const UnreadBadgeStyle &st) {
Assert(rect.height() == st.size);
@@ -915,8 +901,7 @@ void RowPainter::paint(
| (selected ? Flag::Selected : Flag(0))
| Flag::SearchResult
| (showSavedMessages ? Flag::SavedMessages : Flag(0))
| (showRepliesMessages ? Flag::RepliesMessages : Flag(0))/* // #feed
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0))*/;
| (showRepliesMessages ? Flag::RepliesMessages : Flag(0));
paintRow(
p,
row,