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:
@@ -98,7 +98,6 @@ HTile {
|
||||
unreads: model.total_unread
|
||||
highlights: model.total_highlights
|
||||
localUnreads: model.local_unreads
|
||||
localHighlights: model.local_highlights
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -77,7 +77,6 @@ HTile {
|
||||
unreads: model.unreads
|
||||
highlights: model.highlights
|
||||
localUnreads: model.local_unreads
|
||||
localHighlights: model.local_highlights
|
||||
}
|
||||
|
||||
HIcon {
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user