This commit is contained in:
Leeingnyo
2021-12-26 04:10:03 +09:00
parent 0f94288bab
commit b711072492
5 changed files with 20 additions and 10 deletions
+2 -1
View File
@@ -127,7 +127,8 @@ struct Tuple(*T)
end
end
alias CacheableType = Array(Entry) | Array(Title) | String | Tuple(String, Int32)
alias CacheableType = Array(Entry) | Array(Title) | String |
Tuple(String, Int32)
alias CacheEntryType = SortedEntriesCacheEntry |
SortedTitlesCacheEntry |
CacheEntry(String, String) |
+3 -1
View File
@@ -522,7 +522,9 @@ class Title
case opt.not_nil!.method
when .title?
ary = @entries.sort { |a, b| compare_numerically a.sort_title, b.sort_title }
ary = @entries.sort do |a, b|
compare_numerically a.sort_title, b.sort_title
end
when .time_modified?
ary = @entries.sort { |a, b| (a.mtime <=> b.mtime).or \
compare_numerically a.sort_title, b.sort_title }