Sort blacklist items by name first

This commit is contained in:
xynngh 2020-09-20 16:56:37 +04:00
parent 3827b3ed67
commit cd4d0b7cf5
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ public class BlacklistDao {
public List<BlacklistItem> loadAll() {
return getBlacklistItemDao().queryBuilder()
.orderRaw("T.'" + BlacklistItemDao.Properties.Name.columnName + "' IS NULL" +
" OR T.'" + BlacklistItemDao.Properties.Name.columnName + "' = ''")
.orderAsc(BlacklistItemDao.Properties.Name)
.orderAsc(BlacklistItemDao.Properties.Pattern)
.list();
}