'Update all the components of the user interface to reflect the latest data in the current book container.
:param mark_as_modified: If True, the book will be marked as modified, so the user will be prompted to save it
when quitting.'

def apply_container_update_to_gui(self, mark_as_modified=True):

    self.refresh_file_list()
    self.update_global_history_actions()
    self.update_editors_from_container()
    if mark_as_modified:
        self.set_modified()
    self.gui.toc_view.update_if_visible()
    completion_worker().clear_caches()
    self.gui.preview.start_refresh_timer()
