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
d88dee31
Commit
d88dee31
authored
6 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Refresh the room info on the top bar after sync
parent
4ab42c68
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
include/ChatPage.h
+1
-0
1 addition, 0 deletions
include/ChatPage.h
src/ChatPage.cc
+11
-1
11 additions, 1 deletion
src/ChatPage.cc
with
12 additions
and
1 deletion
include/ChatPage.h
+
1
−
0
View file @
d88dee31
...
...
@@ -88,6 +88,7 @@ signals:
void
syncUI
(
const
mtx
::
responses
::
Rooms
&
rooms
);
void
continueSync
(
const
QString
&
next_batch
);
void
syncRoomlist
(
const
std
::
map
<
QString
,
RoomInfo
>
&
updates
);
void
syncTopBar
(
const
std
::
map
<
QString
,
RoomInfo
>
&
updates
);
private
slots
:
void
showUnreadMessageNotification
(
int
count
);
...
...
This diff is collapsed.
Click to expand it.
src/ChatPage.cc
+
11
−
1
View file @
d88dee31
...
...
@@ -440,6 +440,11 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
http
::
client
()
->
getNotifications
();
});
connect
(
this
,
&
ChatPage
::
syncRoomlist
,
room_list_
,
&
RoomList
::
sync
);
connect
(
this
,
&
ChatPage
::
syncTopBar
,
this
,
[
this
](
const
std
::
map
<
QString
,
RoomInfo
>
&
updates
)
{
if
(
updates
.
find
(
currentRoom
())
!=
updates
.
end
())
changeTopRoomInfo
(
currentRoom
());
});
instance_
=
this
;
...
...
@@ -532,7 +537,12 @@ ChatPage::syncCompleted(const mtx::responses::Sync &response)
try
{
cache
::
client
()
->
saveState
(
res
);
emit
syncUI
(
res
.
rooms
);
emit
syncRoomlist
(
cache
::
client
()
->
roomUpdates
(
res
));
auto
updates
=
cache
::
client
()
->
roomUpdates
(
res
);
emit
syncTopBar
(
updates
);
emit
syncRoomlist
(
updates
);
}
catch
(
const
lmdb
::
error
&
e
)
{
std
::
cout
<<
"save cache error:"
<<
e
.
what
()
<<
'\n'
;
// TODO: retry sync.
...
...
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