2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Closed alpha version 2.1.13.1: Multiaccount.

This commit is contained in:
John Preston
2020-06-26 17:09:39 +04:00
parent f8dca0ae88
commit b6ac4a0233
6 changed files with 15 additions and 19 deletions

View File

@@ -198,7 +198,7 @@ QImage ArchiveUserpic(not_null<Data::Folder*> folder) {
return result;
}
QImage UnreadBadge(PeerData *peer) {
QImage UnreadBadge(not_null<PeerData*> peer) {
const auto history = peer->owner().history(peer->id);
const auto count = history->unreadCountForBadge();
if (!count) {
@@ -261,10 +261,6 @@ TimeId CalculateOnlineTill(not_null<PeerData*> peer) {
return 0;
};
inline auto RplToEmpty() {
return rpl::map([=] { return rpl::empty_value(); });
}
int WidthFromString(NSString *s) {
return (int)ceil(
[[NSTextField labelWithString:s] frame].size.width) * 1.2;
@@ -933,11 +929,11 @@ void AppendEmojiPacks(
_session->changes().historyUpdates(
_session->data().history(peer),
Data::HistoryUpdate::Flag::UnreadView
) | RplToEmpty(),
) | rpl::to_empty,
_session->changes().peerFlagsValue(
peer,
UpdateFlag::Notifications
) | RplToEmpty()
) | rpl::to_empty
) | rpl::start_with_next([=] {
updateBadge(pin);
}, *peerChangedLifetime);