2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Collapse forum row height in narrow layout.

This commit is contained in:
John Preston
2022-12-01 21:36:26 +04:00
parent c200263f2e
commit f0b8ccbd71
12 changed files with 92 additions and 43 deletions

View File

@@ -101,13 +101,15 @@ 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() {
void Row::recountHeight(float64 narrowRatio) {
if (const auto history = _id.history()) {
_height = history->peer->isForum()
? st::forumDialogRow.height
? anim::interpolate(
st::forumDialogRow.height,
st::defaultDialogRow.height,
narrowRatio)
: st::defaultDialogRow.height;
} else if (_id.folder()) {
_height = st::defaultDialogRow.height;