People: Sort subject names by file count and add new to the top #22
This commit is contained in:
parent
cf9fb1db1a
commit
29ed7168d1
2 changed files with 2 additions and 2 deletions
|
@ -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++) {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue