Remove pointless local_highlights

An event can only be considered a highlight if a push rule make it so,
thus an event can never be locally highlighted only.
This commit is contained in:
miruka
2020-11-03 06:43:30 -04:00
parent 35a8c0aec4
commit 2ef1edb3dc
8 changed files with 21 additions and 46 deletions

View File

@@ -98,7 +98,6 @@ HTile {
unreads: model.total_unread
highlights: model.total_highlights
localUnreads: model.local_unreads
localHighlights: model.local_highlights
}
}

View File

@@ -11,10 +11,6 @@ HLabel {
property int unreads: 0
property int highlights: 0
property bool localUnreads: false
property bool localHighlights: false
readonly property bool useHighlightStyle:
highlights || (! unreads && localUnreads && localHighlights)
text:
@@ -25,13 +21,13 @@ HLabel {
""
color:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightText :
indicatorTheme.text
font.pixelSize: theme.fontSize.small
font.bold:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightBold :
indicatorTheme.bold
@@ -44,22 +40,22 @@ HLabel {
background: Rectangle {
radius:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightRadius :
indicatorTheme.radius
color:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightBackground :
indicatorTheme.background
border.width:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightBorderWidth :
indicatorTheme.borderWidth
border.color:
useHighlightStyle ?
highlights ?
indicatorTheme.highlightBorder :
indicatorTheme.border

View File

@@ -77,7 +77,6 @@ HTile {
unreads: model.unreads
highlights: model.highlights
localUnreads: model.local_unreads
localHighlights: model.local_highlights
}
HIcon {

View File

@@ -93,7 +93,7 @@ HListView {
function cycleUnreadRooms(forward=true, highlights=false) {
const prop = highlights ? "highlights" : "unreads"
const local_prop = highlights ? "local_highlights" : "local_unreads"
const local_prop = highlights ? "highlights" : "local_unreads"
const start = currentIndex === -1 ? 0 : currentIndex
let index = start

View File

@@ -627,8 +627,7 @@ Rectangle {
(
chat.roomInfo.unreads ||
chat.roomInfo.highlights ||
chat.roomInfo.local_unreads ||
chat.roomInfo.local_highlights
chat.roomInfo.local_unreads
) &&
Qt.application.state === Qt.ApplicationActive &&
eventList.visibleEnd.y > eventList.contentHeight - 100