Skip to content

Commit

Permalink
fix: 应用渠道详情判断渠道列表错误
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Oct 29, 2020
1 parent 2d52d8e commit 5d3b43f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/helpers/apps_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ def release_type_url(release)
link_to(release_type, channel_release_types_path(release.channel, name: release_type))
end

def display_app_device(release)
channel = release.channel
def display_app_device(value)
if value.is_a?(Release)
channel = value.channel
return "#{device_name(channel.device_type)} (#{value.device})" if value.device
else
channel = value
end

return "#{device_name(channel.device_type)} (#{release.device})" if release.device
return channel.name if channel.name.downcase == channel.device_type.downcase
return "#{channel.name} (#{device_name(channel.device_type)})"
end
Expand Down

0 comments on commit 5d3b43f

Please sign in to comment.