mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Improve top bar design for forum / topic.
This commit is contained in:
@@ -707,14 +707,16 @@ void Widget::refreshFolderTopBar() {
|
||||
_folderTopBar.create(this, controller());
|
||||
updateControlsGeometry();
|
||||
}
|
||||
const auto history = _openedForum
|
||||
? session().data().history(_openedForum).get()
|
||||
: nullptr;
|
||||
_folderTopBar->setActiveChat(
|
||||
HistoryView::TopBarWidget::ActiveChat{
|
||||
.key = (_openedForum
|
||||
? Dialogs::Key(session().data().history(_openedForum))
|
||||
? Dialogs::Key(history)
|
||||
: Dialogs::Key(_openedFolder)),
|
||||
.section = Dialogs::EntryState::Section::ChatsList,
|
||||
},
|
||||
nullptr);
|
||||
}, history ? history->sendActionPainter().get() : nullptr);
|
||||
} else {
|
||||
_folderTopBar.destroy();
|
||||
}
|
||||
|
@@ -822,7 +822,10 @@ void RowPainter::Paint(
|
||||
const auto badgesState = entry->chatListBadgesState();
|
||||
const auto item = entry->chatListMessage();
|
||||
const auto cloudDraft = [&]() -> const Data::Draft*{
|
||||
if (thread && (!item || !badgesState.unread)) {
|
||||
if (!thread) {
|
||||
return nullptr;
|
||||
}
|
||||
if ((!peer || !peer->isForum()) && (!item || !badgesState.unread)) {
|
||||
// Draw item, if there are unread messages.
|
||||
const auto draft = thread->owningHistory()->cloudDraft(
|
||||
thread->topicRootId());
|
||||
|
Reference in New Issue
Block a user