mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Show selected sublist as active in list.
This commit is contained in:
@@ -624,7 +624,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||
bool selected,
|
||||
bool mayBeActive) {
|
||||
const auto key = row->key();
|
||||
const auto active = mayBeActive && (activeEntry.key == key);
|
||||
const auto active = mayBeActive && isRowActive(row, activeEntry);
|
||||
const auto forum = key.history() && key.history()->isForum();
|
||||
if (forum && !_topicJumpCache) {
|
||||
_topicJumpCache = std::make_unique<Ui::TopicJumpCache>();
|
||||
@@ -977,6 +977,14 @@ void InnerWidget::paintCollapsedRow(
|
||||
});
|
||||
}
|
||||
|
||||
bool InnerWidget::isRowActive(
|
||||
not_null<Row*> row,
|
||||
const RowDescriptor &entry) const {
|
||||
const auto key = row->key();
|
||||
return (entry.key == key)
|
||||
|| (entry.key.sublist() && key.peer() && key.peer()->isSelf());
|
||||
}
|
||||
|
||||
bool InnerWidget::isSearchResultActive(
|
||||
not_null<FakeRow*> result,
|
||||
const RowDescriptor &entry) const {
|
||||
|
Reference in New Issue
Block a user