Skip to content

Instantly share code, notes, and snippets.

@igkuz
Created May 30, 2013 09:25
Show Gist options
  • Save igkuz/5676747 to your computer and use it in GitHub Desktop.
Save igkuz/5676747 to your computer and use it in GitHub Desktop.
def fill_view(models, active_index)
if models.count > 0
@broadcast.truncate
@items = models
@current_item_index = active_index
@current_item = models[active_index]
if models[0].is_a?(Channel)
@channel_info_area_logo.props.url = @current_item.small_logo
@channel_info_area_text.props.text = @current_item.name
hide_episode_description
@player = @broadcast.view(Telemarker::Views::Controls::Player, width: 1809, height: 972, :channel => @current_item.abbreviation)
else
@channel_info_area_logo.props.url = @current_item.channel.small_logo
@channel_info_area_text.props.text = @current_item.channel.name
@player = @broadcast.view(Telemarker::Views::Controls::Player, width: 1809, height: 972, :channel => @current_item.channel.abbreviation)
@description_area.truncate
@description_map = []
@description_width = nil
@rotate_duration = nil
append_episode_corners
populate_episode_description
if @description_width > @description_area.props.width
animate_text
else
description_text_wrapper.props.width = @description_area.props.width
end
@player.change_stream(@current_item.channel.abbreviation, @current_item.beginning, @current_item.ending)
end
set_channel_info_width
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment