mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Display book percentage in "recently added"
This commit is contained in:
+6
-1
@@ -579,9 +579,14 @@ class Library
|
|||||||
grouped_entries.map do |ary|
|
grouped_entries.map do |ary|
|
||||||
# Get the most recently added entry in the group
|
# Get the most recently added entry in the group
|
||||||
entry = ary.max_by { |e| e.date_added }
|
entry = ary.max_by { |e| e.date_added }
|
||||||
|
if ary.size > 1
|
||||||
|
percentage = entry.book.load_percentage username
|
||||||
|
else
|
||||||
|
percentage = entry.load_percentage username
|
||||||
|
end
|
||||||
{
|
{
|
||||||
entry: entry,
|
entry: entry,
|
||||||
percentage: entry.load_percentage(username),
|
percentage: percentage,
|
||||||
grouped_count: ary.size,
|
grouped_count: ary.size,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user