This commit is contained in:
yuanke 2016-11-09 14:20:13 +08:00
parent 10f810960e
commit 77f3921d0e
1 changed files with 7 additions and 12 deletions

View File

@ -24,8 +24,8 @@ module Mobile
IssueStatus.find(issue.status_id).name
when :comment_count
issue.journals.where("notes is not null and notes != ''").count
# all_comments = []
# get_all_children(all_comments, f).count
# all_comments = []
# get_all_children(all_comments, f).count
when :project_name
issue.project.name
when :praise_count
@ -99,8 +99,7 @@ module Mobile
if f.is_a?(::Issue)
# f.journals_for_messages.reverse
if !opt[:children] && opt[:type] == 0
#opt[:children] = true
opt.merge({:children=>true})
opt[:children] = true
tStart = opt[:page]*5
tEnd = (opt[:page]+1)*5 - 1
@ -136,8 +135,7 @@ module Mobile
# opt[:bottom] = true
# parents_reply[opt[:page]..opt[:page]]
else
#opt[:bottom] = true
opt.merge({:bottom=>true})
opt[:bottom] = true
parents_reply[0..0]
end
else
@ -153,8 +151,7 @@ module Mobile
parents_reply = get_reply_parents(parents_reply, f)
if parents_reply.count > 2 && !opt[:top]
if opt[:type] == 1
#opt[:top] = true
opt.merge({:top=>true})
opt[:top] = true
tStart = (opt[:page]-1)*5+2
tEnd = (opt[:page])*5+2 - 1
@ -169,14 +166,12 @@ module Mobile
[]
end
else
#opt[:top] = true
opt.merge({:top=>true})
opt[:top] = true
parents_reply = parents_reply.reverse[0..1]
parents_reply.reverse
end
elsif parents_reply.count == 2 && !opt[:top]
#opt[:top] = true
opt.merge({:top=>true})
opt[:top] = true
parents_reply = parents_reply.reverse[0..0]
parents_reply.reverse
else