This commit is contained in:
yuanke 2016-11-09 14:15:37 +08:00
parent 59e6495610
commit 10f810960e
1 changed files with 12 additions and 7 deletions

View File

@ -99,7 +99,8 @@ module Mobile
if f.is_a?(::Issue)
# f.journals_for_messages.reverse
if !opt[:children] && opt[:type] == 0
opt[:children] = true
#opt[:children] = true
opt.merge({:children=>true})
tStart = opt[:page]*5
tEnd = (opt[:page]+1)*5 - 1
@ -135,7 +136,8 @@ module Mobile
# opt[:bottom] = true
# parents_reply[opt[:page]..opt[:page]]
else
opt[:bottom] = true
#opt[:bottom] = true
opt.merge({:bottom=>true})
parents_reply[0..0]
end
else
@ -151,7 +153,8 @@ 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[:top] = true
opt.merge({:top=>true})
tStart = (opt[:page]-1)*5+2
tEnd = (opt[:page])*5+2 - 1
@ -166,12 +169,14 @@ module Mobile
[]
end
else
opt[:top] = true
#opt[:top] = true
opt.merge({:top=>true})
parents_reply = parents_reply.reverse[0..1]
parents_reply.reverse
end
elsif parents_reply.count == 2 && !opt[:top]
opt[:top] = true
#opt[:top] = true
opt.merge({:top=>true})
parents_reply = parents_reply.reverse[0..0]
parents_reply.reverse
else