People: Sort subject names by file count and add new to the top #22

This commit is contained in:
Michael Mayer 2021-09-05 22:32:24 +02:00
parent cf9fb1db1a
commit 29ed7168d1
2 changed files with 2 additions and 2 deletions

View file

@ -148,7 +148,7 @@ export default class Config {
switch (type) {
case "created":
this.values.people.push(...data.entities);
this.values.people.unshift(...data.entities);
break;
case "updated":
for (let i = 0; i < data.entities.length; i++) {

View file

@ -16,7 +16,7 @@ func People() (people entity.People, err error) {
Table(entity.Subject{}.TableName()).
Select("subject_uid, subject_name, subject_alias, favorite").
Where("deleted_at IS NULL AND subject_type = ?", entity.SubjectPerson).
Order("subject_name").
Order("file_count DESC").
Limit(2000).Offset(0).
Scan(&people).Error