mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
When a title has no entry as immediate child, always return 0 as the reading progress
This commit is contained in:
parent
4aeda53806
commit
7774efa471
@ -212,6 +212,7 @@ class Title
|
|||||||
page / entry_obj.pages
|
page / entry_obj.pages
|
||||||
end
|
end
|
||||||
def load_percetage(username)
|
def load_percetage(username)
|
||||||
|
return 0 if @entries.empty?
|
||||||
read_pages = total_pages = 0
|
read_pages = total_pages = 0
|
||||||
@entries.each do |e|
|
@entries.each do |e|
|
||||||
read_pages += load_progress username, e.title
|
read_pages += load_progress username, e.title
|
||||||
|
Loading…
x
Reference in New Issue
Block a user