mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-05 12:25:32 -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|
|
||||
# Get the most recently added entry in the group
|
||||
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,
|
||||
percentage: entry.load_percentage(username),
|
||||
percentage: percentage,
|
||||
grouped_count: ary.size,
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user