mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-06 04:45:31 -04:00
Display book percentage in "recently added"
This commit is contained in:
parent
674da55bde
commit
06d6311080
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user