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
b9521b08
Commit
b9521b08
authored
7 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Stop sync timer after logout
Silence errors from redacted events
parent
4c00e64f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ChatPage.cc
+4
-0
4 additions, 0 deletions
src/ChatPage.cc
src/TimelineView.cc
+18
-1
18 additions, 1 deletion
src/TimelineView.cc
with
22 additions
and
1 deletion
src/ChatPage.cc
+
4
−
0
View file @
b9521b08
...
...
@@ -264,6 +264,10 @@ ChatPage::setOwnAvatar(const QPixmap &img)
void
ChatPage
::
syncFailed
(
const
QString
&
msg
)
{
// Stop if sync is not active. e.g user is logged out.
if
(
client_
->
getHomeServer
().
isEmpty
())
return
;
qWarning
()
<<
"Sync error:"
<<
msg
;
sync_timer_
->
start
(
sync_interval_
*
5
);
}
...
...
This diff is collapsed.
Click to expand it.
src/TimelineView.cc
+
18
−
1
View file @
b9521b08
...
...
@@ -34,6 +34,19 @@
namespace
events
=
matrix
::
events
;
namespace
msgs
=
matrix
::
events
::
messages
;
static
bool
isRedactedEvent
(
const
QJsonObject
&
event
)
{
if
(
event
.
contains
(
"redacted_because"
))
return
true
;
if
(
event
.
contains
(
"unsigned"
)
&&
event
.
value
(
"unsigned"
).
toObject
().
contains
(
"redacted_because"
))
return
true
;
return
false
;
}
TimelineView
::
TimelineView
(
const
Timeline
&
timeline
,
QSharedPointer
<
MatrixClient
>
client
,
const
QString
&
room_id
,
...
...
@@ -310,7 +323,11 @@ TimelineView::parseMessageEvent(const QJsonObject &event, TimelineDirection dire
return
createTimelineItem
(
emote
,
with_sender
);
}
else
if
(
msg_type
==
events
::
MessageEventType
::
Unknown
)
{
qWarning
()
<<
"Unknown message type"
<<
event
;
// TODO Handle redacted messages.
// Silenced for now.
if
(
!
isRedactedEvent
(
event
))
qWarning
()
<<
"Unknown message type"
<<
event
;
return
nullptr
;
}
}
...
...
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