mirror of https://github.com/zulip/zulip.git
Sort rows on the activity report by realm/count.
(imported from commit ed1db1b7685dc113acb8a6a8317b7b84d10c440b)
This commit is contained in:
parent
95ceba2828
commit
b1ef9a686c
|
@ -1822,7 +1822,8 @@ class ActivityTable(object):
|
|||
row['age'] = age
|
||||
|
||||
def sorted_rows(self):
|
||||
return sorted(self.rows.iteritems(), key=lambda (k,r): r['age'])
|
||||
keyfunc = lambda (k,r): (r['realm'], -1 * r.get('send_message_count', 0))
|
||||
return sorted(self.rows.iteritems(), key=keyfunc)
|
||||
|
||||
def can_view_activity(request):
|
||||
return request.user.realm.domain == 'zulip.com'
|
||||
|
|
Loading…
Reference in New Issue