• Thomas Randolph's avatar
    Update the collapse state when the file changes, too · f710d4e0
    Thomas Randolph authored
    When the file loads, it's collapsed automatically
    if the user has reviewed it already.
    
    Unfortunately, this only happens when the component
    mounts.
    
    To make the component reactive - specifically in
    file-by-file mode - we add the check for the collapse
    state into a watcher on the file ID.
    
    Critically, we leave the `mounted` check in place, too.
    The first time the component is mounted, it has the
    initial file already present - the watcher won't trigger
    on that first render.
    f710d4e0
diff_file.vue 10.6 KB