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
1994ea63
Verified
Commit
1994ea63
authored
1 year ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Show custom reactions in reaction history
fixes #1467
parent
a1fed44b
No related branches found
No related tags found
No related merge requests found
Pipeline
#4833
passed
1 year ago
Stage: sign
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/qml/MessageView.qml
+50
-5
50 additions, 5 deletions
resources/qml/MessageView.qml
with
50 additions
and
5 deletions
resources/qml/MessageView.qml
+
50
−
5
View file @
1994ea63
...
...
@@ -106,21 +106,66 @@ Item {
Repeater
{
model
:
Settings
.
recentReactions
visible
:
room
?
room
.
permissions
.
canSend
(
MtxEvent
.
Reaction
)
:
false
delegate
:
AbstractButton
{
id
:
button
delegate
:
TextButton
{
required
property
string
modelData
visible
:
room
?
room
.
permissions
.
canSend
(
MtxEvent
.
Reaction
)
:
false
property
color
highlightColor
:
Nheko
.
colors
.
highlight
property
color
buttonTextColor
:
Nheko
.
colors
.
buttonText
property
bool
showImage
:
modelData
.
startsWith
(
"
mxc://
"
)
//Layout.preferredHeight: fontMetrics.height
Layout.alignment
:
Qt
.
AlignBottom
focusPolicy
:
Qt
.
NoFocus
width
:
showImage
?
16
:
buttonText
.
implicitWidth
height
:
showImage
?
16
:
buttonText
.
implicitHeight
implicitWidth
:
showImage
?
16
:
buttonText
.
implicitWidth
implicitHeight
:
showImage
?
16
:
buttonText
.
implicitHeight
Label
{
id
:
buttonText
Layout.preferredHeight
:
fontMetrics
.
height
font.family
:
Settings
.
emojiFont
visible
:
!
button
.
showImage
anchors.centerIn
:
parent
padding
:
0
text
:
button
.
modelData
color
:
button
.
hovered
?
button
.
highlightColor
:
button
.
buttonTextColor
font.family
:
Settings
.
emojiFont
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
}
Image
{
id
:
buttonImg
// Workaround, can't get icon.source working for now...
anchors.fill
:
parent
source
:
button
.
showImage
?
(
button
.
modelData
.
replace
(
"
mxc://
"
,
"
image://MxcImage/
"
)
+
"
?scale
"
)
:
""
sourceSize.height
:
button
.
height
sourceSize.width
:
button
.
width
fillMode
:
Image
.
PreserveAspectFit
}
CursorShape
{
anchors.fill
:
parent
cursorShape
:
Qt
.
PointingHandCursor
}
Ripple
{
color
:
Qt
.
rgba
(
buttonTextColor
.
r
,
buttonTextColor
.
g
,
buttonTextColor
.
b
,
0.5
)
}
text
:
modelData
onClicked
:
{
room
.
input
.
reaction
(
row
.
model
.
eventId
,
modelData
);
TimelineManager
.
focusMessageInput
();
}
}
}
ImageButton
{
...
...
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