<commit_before>class SplitViewController < UISplitViewController
  def master_screen
    s = self.viewControllers.first
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def detail_screen
    s = self.viewControllers.last
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def master_screen=(s)
    self.viewControllers = [s.main_controller, self.viewControllers.last]
  end
  def detail_screen=(s)
    self.viewControllers = [self.viewControllers.first, s.main_controller]
  end
  def screens=(s_array)
    self.viewControllers = s_array
  end
end<commit_msg>Reuse the split screen button on the new detail screen.<commit_after>class SplitViewController < UISplitViewController
  def master_screen
    s = self.viewControllers.first
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def detail_screen
    s = self.viewControllers.last
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def master_screen=(s)
    self.viewControllers = [s.main_controller, self.viewControllers.last]
  end
  def detail_screen=(s)
    # set the button from the old detail screen to the new one
    button = detail_screen.navigationItem.leftBarButtonItem
    s.navigationItem.leftBarButtonItem = button
    
    self.viewControllers = [self.viewControllers.first, s.main_controller]
  end
  def screens=(s_array)
    self.viewControllers = s_array
  end
end
{'fraction_non_alphanumeric': 0.0782967032967033, 'fraction_numerical': 0.0, 'mean_word_length': 4.336996336996337, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4884396', 'n_tokens_mistral': 448, 'n_tokens_neox': 447, 'n_words': 98}