Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Maunium
synapse
Commits
bcf30b29
"src/api/client_server/read_marker.rs" did not exist on "33215d6099e7aa4728c240c26d243b3862004197"
Commit
bcf30b29
authored
10 years ago
by
Emmanuel ROHEE
Browse files
Options
Downloads
Patches
Plain Diff
BF: Reset base timer time ($scope.now) everytime last_active_ago is touched
parent
b4984d5e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webclient/room/room-controller.js
+6
-7
6 additions, 7 deletions
webclient/room/room-controller.js
with
6 additions
and
7 deletions
webclient/room/room-controller.js
+
6
−
7
View file @
bcf30b29
...
...
@@ -163,8 +163,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
// set target_user_id to keep things clear
var
target_user_id
=
chunk
.
state_key
;
var
now
=
new
Date
().
getTime
();
var
isNewMember
=
!
(
target_user_id
in
$scope
.
members
);
if
(
isNewMember
)
{
...
...
@@ -174,6 +172,8 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
}
if
(
"
last_active_ago
"
in
chunk
.
content
)
{
chunk
.
last_active_ago
=
chunk
.
content
.
last_active_ago
;
$scope
.
now
=
new
Date
().
getTime
();
chunk
.
last_updated
=
$scope
.
now
;
}
if
(
"
displayname
"
in
chunk
.
content
)
{
chunk
.
displayname
=
chunk
.
content
.
displayname
;
...
...
@@ -181,7 +181,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
if
(
"
avatar_url
"
in
chunk
.
content
)
{
chunk
.
avatar_url
=
chunk
.
content
.
avatar_url
;
}
chunk
.
last_updated
=
now
;
$scope
.
members
[
target_user_id
]
=
chunk
;
if
(
target_user_id
in
$rootScope
.
presence
)
{
...
...
@@ -197,6 +196,8 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
}
if
(
"
last_active_ago
"
in
chunk
.
content
)
{
member
.
last_active_ago
=
chunk
.
content
.
last_active_ago
;
$scope
.
now
=
new
Date
().
getTime
();
member
.
last_updated
=
$scope
.
now
;
}
}
};
...
...
@@ -221,6 +222,8 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
if
(
"
last_active_ago
"
in
chunk
.
content
)
{
member
.
last_active_ago
=
chunk
.
content
.
last_active_ago
;
$scope
.
now
=
new
Date
().
getTime
();
member
.
last_updated
=
$scope
.
now
;
}
// this may also contain a new display name or avatar url, so check.
...
...
@@ -332,10 +335,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
eventHandlerService
.
waitForInitialSyncCompletion
().
then
(
function
()
{
// Some data has been retrieved from the iniialSync request
// So, the relative time starts here
$scope
.
now
=
new
Date
().
getTime
();
var
needsToJoin
=
true
;
// The room members is available in the data fetched by initialSync
...
...
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