Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
2d7c007e
Verified
Commit
2d7c007e
authored
1 year ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Fix binding loop in roomlist
parent
805f0a30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4899
passed
1 year ago
Stage: sign
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/qml/RoomList.qml
+42
-35
42 additions, 35 deletions
resources/qml/RoomList.qml
resources/qml/components/NotificationBubble.qml
+1
-0
1 addition, 0 deletions
resources/qml/components/NotificationBubble.qml
with
43 additions
and
35 deletions
resources/qml/RoomList.qml
+
42
−
35
View file @
2d7c007e
...
...
@@ -546,66 +546,73 @@ Page {
visible
:
!
collapsed
width
:
roomItem
.
width
-
avatar
.
width
NotificationBubble
{
id
:
notificationBubble
Layout.alignment
:
Qt
.
AlignRight
Layout.leftMargin
:
Nheko
.
paddingSmall
Layout.preferredHeight
:
implicitHeight
Layout.preferredWidth
:
implicitWidth
bubbleBackgroundColor
:
roomItem
.
bubbleBackground
bubbleTextColor
:
roomItem
.
bubbleText
hasLoudNotification
:
roomItem
.
hasLoudNotification
mayBeVisible
:
!
collapsed
&&
(
isSpace
?
Settings
.
spaceNotifications
:
true
)
notificationCount
:
roomItem
.
notificationCount
parent
:
isSpace
?
titleRow
:
subtextRow
}
RowLayout
{
Item
{
id
:
titleRow
Layout.alignment
:
Qt
.
AlignTop
Layout.preferredWidth
:
roomItem
.
width
-
avatar
.
width
spacing
:
Nheko
.
paddingSmall
Item
{
Layout.alignment
:
Qt
.
AlignBottom
Layout.fillWidth
:
true
ElidedLabel
{
anchors.bottom
:
parent
.
bottom
color
:
roomItem
.
importantText
elideWidth
:
parent
.
width
fullText
:
TimelineManager
.
htmlEscape
(
roomName
)
textFormat
:
Text
.
RichText
}
Layout.fillWidth
:
true
Layout.preferredHeight
:
subtitleText
.
implicitHeight
ElidedLabel
{
id
:
titleText
anchors.left
:
parent
.
left
color
:
roomItem
.
importantText
elideWidth
:
parent
.
width
-
(
timestamp
.
visible
?
timestamp
.
implicitWidth
:
0
)
-
(
spaceNotificationBubble
.
visible
?
spaceNotificationBubble
.
implicitWidth
:
0
)
fullText
:
TimelineManager
.
htmlEscape
(
roomName
)
textFormat
:
Text
.
RichText
}
Label
{
id
:
timestamp
Layout.alignment
:
Qt
.
AlignRight
|
Qt
.
AlignBottom
anchors.baseline
:
titleText
.
baseline
anchors.right
:
parent
.
right
color
:
roomItem
.
unimportantText
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
*
0.9
text
:
time
visible
:
!
isInvite
&&
!
isSpace
}
NotificationBubble
{
id
:
spaceNotificationBubble
anchors.right
:
parent
.
right
bubbleBackgroundColor
:
roomItem
.
bubbleBackground
bubbleTextColor
:
roomItem
.
bubbleText
hasLoudNotification
:
roomItem
.
hasLoudNotification
mayBeVisible
:
!
collapsed
&&
(
isSpace
?
Settings
.
spaceNotifications
:
false
)
notificationCount
:
roomItem
.
notificationCount
parent
:
isSpace
?
titleRow
:
subtextRow
}
}
RowLayout
{
Item
{
id
:
subtextRow
Layout.alignment
:
Qt
.
AlignBottom
Layout.fillWidth
:
true
height
:
visible
?
0
:
undefined
spacing
:
0
Layout.preferredHeight
:
subtitleText
.
implicitHeight
visible
:
!
isSpace
ElidedLabel
{
Layout.fillWidth
:
true
id
:
subtitleText
anchors.left
:
parent
.
left
color
:
roomItem
.
unimportantText
elideWidth
:
width
elideWidth
:
subtextRow
.
width
-
(
subtextNotificationBubble
.
visible
?
subtextNotificationBubble
.
implicitWidth
:
0
)
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
*
0.9
fullText
:
TimelineManager
.
htmlEscape
(
lastMessage
)
textFormat
:
Text
.
RichText
}
NotificationBubble
{
id
:
subtextNotificationBubble
anchors.baseline
:
subtitleText
.
baseline
anchors.right
:
parent
.
right
bubbleBackgroundColor
:
roomItem
.
bubbleBackground
bubbleTextColor
:
roomItem
.
bubbleText
hasLoudNotification
:
roomItem
.
hasLoudNotification
mayBeVisible
:
!
collapsed
notificationCount
:
roomItem
.
notificationCount
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/qml/components/NotificationBubble.qml
+
1
−
0
View file @
2d7c007e
...
...
@@ -15,6 +15,7 @@ Rectangle {
required
property
color
bubbleTextColor
property
bool
mayBeVisible
:
true
property
alias
font
:
notificationBubbleText
.
font
baselineOffset
:
notificationBubbleText
.
baseline
-
bubbleRoot
.
top
visible
:
mayBeVisible
&&
notificationCount
>
0
implicitHeight
:
notificationBubbleText
.
height
+
Nheko
.
paddingMedium
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment