Comment out non-folder feed code.

This commit is contained in:
John Preston
2019-04-15 15:54:03 +04:00
parent 905a024aed
commit 9bf8a8108d
57 changed files with 1392 additions and 1459 deletions
+18 -18
View File
@@ -165,7 +165,7 @@ enum class Flag {
OnlyBackground = 0x04,
SearchResult = 0x08,
SavedMessages = 0x10,
FeedSearchResult = 0x20,
//FeedSearchResult = 0x20, // #feed
};
inline constexpr bool is_flag_type(Flag) { return true; }
@@ -257,20 +257,20 @@ void paintRow(
st::msgNameFont->height);
const auto promoted = chat.entry()->useProxyPromotion()
&& !(flags & (Flag::SearchResult | Flag::FeedSearchResult));
&& !(flags & (Flag::SearchResult/* | Flag::FeedSearchResult*/)); // #feed
if (promoted) {
const auto text = lang(lng_proxy_sponsor);
paintRowTopRight(p, text, rectForName, active, selected);
} else if (from && !(flags & Flag::FeedSearchResult)) {
} else if (from/* && !(flags & Flag::FeedSearchResult)*/) { // #feed
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()) {
if (const auto feedTypeIcon = FeedTypeIcon(feed, active, selected)) {
feedTypeIcon->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
@@ -462,14 +462,14 @@ const style::icon *ChatTypeIcon(
return nullptr;
}
const style::icon *FeedTypeIcon(
not_null<Data::Feed*> feed,
bool active,
bool selected) {
return &(active ? st::dialogsFeedIconActive
: (selected ? st::dialogsFeedIconOver : st::dialogsFeedIcon));
}
//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);
@@ -789,8 +789,8 @@ void RowPainter::paint(
| (selected ? Flag::Selected : Flag(0))
| (onlyBackground ? Flag::OnlyBackground : Flag(0))
| Flag::SearchResult
| (showSavedMessages ? Flag::SavedMessages : Flag(0))
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0));
| (showSavedMessages ? Flag::SavedMessages : Flag(0))/* // #feed
| (row->searchInChat().feed() ? Flag::FeedSearchResult : Flag(0))*/;
paintRow(
p,
row,