mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 10:04:56 -04:00
order the members list by most recently active
This commit is contained in:
parent
b60283473a
commit
ce4ca473cb
2 changed files with 19 additions and 7 deletions
|
@ -114,7 +114,20 @@ matrixWebClient
|
|||
return d + "d " + h + "h";
|
||||
}
|
||||
})
|
||||
.filter('to_trusted', ['$sce', function($sce){
|
||||
.filter('orderMembersList', function($sce) {
|
||||
return function(members) {
|
||||
var filtered = [];
|
||||
angular.forEach(members, function(value, key) {
|
||||
value["id"] = key;
|
||||
filtered.push( value );
|
||||
});
|
||||
filtered.sort(function (a, b) {
|
||||
return ((a["mtime_age"] || 10e10)> (b["mtime_age"] || 10e10) ? 1 : -1);
|
||||
});
|
||||
return filtered;
|
||||
};
|
||||
})
|
||||
.filter('unsafe', ['$sce', function($sce) {
|
||||
return function(text) {
|
||||
return $sce.trustAsHtml(text);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue