Fixed build in Xcode.

This commit is contained in:
23rd 2022-10-20 18:57:15 +03:00 committed by John Preston
parent 6d3f9017fa
commit fd2edb51e9
3 changed files with 12 additions and 10 deletions

View file

@ -242,7 +242,7 @@ public:
protected:
void notifyUnreadStateChange(const UnreadState &wasState);
auto unreadStateChangeNotifier(bool required);
inline auto unreadStateChangeNotifier(bool required);
[[nodiscard]] int lookupPinnedIndex(FilterId filterId) const;

View file

@ -57,14 +57,7 @@ private:
void finalizeCloudUnread();
void recomputeFullListSize();
auto unreadStateChangeNotifier(bool notify) {
const auto wasState = notify ? unreadState() : UnreadState();
return gsl::finally([=] {
if (notify) {
_unreadStateChanges.fire_copy(wasState);
}
});
}
inline auto unreadStateChangeNotifier(bool notify);
FilterId _filterId = 0;
IndexedList _all;
@ -82,4 +75,13 @@ private:
};
auto MainList::unreadStateChangeNotifier(bool notify) {
const auto wasState = notify ? unreadState() : UnreadState();
return gsl::finally([=] {
if (notify) {
_unreadStateChanges.fire_copy(wasState);
}
});
}
} // namespace Dialogs

View file

@ -117,7 +117,7 @@ QImage UnreadBadge(not_null<PeerData*> peer) {
Dialogs::Ui::PaintUnreadBadge(
p,
unread,
counter,
result.width(),
result.height() - unreadSt.size,
unreadSt,