2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Update dialog row height on topic switch.

This commit is contained in:
John Preston
2022-11-29 21:36:34 +04:00
parent 3c799a5cc1
commit beaea9c57d
14 changed files with 80 additions and 2 deletions

View File

@@ -100,10 +100,16 @@ void BasicRow::paintUserpic(
Row::Row(Key key, int index, int top) : _id(key), _top(top), _index(index) {
if (const auto history = key.history()) {
updateCornerBadgeShown(history->peer);
}
recountHeight();
}
void Row::recountHeight() {
if (const auto history = _id.history()) {
_height = history->peer->isForum()
? st::forumDialogRow.height
: st::defaultDialogRow.height;
} else if (key.folder()) {
} else if (_id.folder()) {
_height = st::defaultDialogRow.height;
} else {
_height = st::forumTopicRow.height;