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

Support dialog rows with variable height.

This commit is contained in:
John Preston
2022-11-11 10:23:23 +04:00
parent 248337daf5
commit 37308cde21
26 changed files with 600 additions and 401 deletions

View File

@@ -300,10 +300,10 @@ PositionChange Entry::adjustByPosInChatList(
not_null<MainList*> list) {
const auto links = chatListLinks(filterId);
Assert(links != nullptr);
const auto from = links->main->pos();
const auto from = links->main->top();
list->indexed()->adjustByDate(*links);
const auto to = links->main->pos();
return { from, to };
const auto to = links->main->top();
return { .from = from, .to = to, .height = links->main->height() };
}
void Entry::setChatListTimeId(TimeId date) {
@@ -315,7 +315,7 @@ void Entry::setChatListTimeId(TimeId date) {
}
int Entry::posInChatList(FilterId filterId) const {
return mainChatListLink(filterId)->pos();
return mainChatListLink(filterId)->index();
}
not_null<Row*> Entry::addToChatList(