Fix options order (#27)

This commit is contained in:
Egor Cherniak 2023-08-24 13:59:12 +03:00 committed by GitHub
parent bf334805d9
commit e70501ae2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ public class InlineHandler implements CommonHandler<AnswerInlineQuery> {
}
List<InlineQueryResultArticle> queryResultArticleListCopy = queryResultArticleList;
queryResultArticleListCopy.sort(Comparator.comparingInt(q -> q.getId().length()));
queryResultArticleListCopy.sort(Comparator.comparingInt(q -> q.getTitle().length()));
if (queryResultArticleListCopy.size() > MAX_INLINE_LIMIT) {
queryResultArticleListCopy = queryResultArticleListCopy.subList(0, MAX_INLINE_LIMIT);
}