Closed aviatesk closed 5 years ago
Thanks for getting started on this. I ended up making the changes myself and implementing a ViewController that can create the view only when it's requested. Feel free to take a look at the commit to see how it was working before.
Thanks for your work !
In this PR, I'm trying to address the problem proposed in #787.
What's wrong
So far, I confirmed that when there is a previously serialized view,
deserializedOutputView
works fine and restores the view into the location where it located.But even when the view had been destroyed,
activate
function still creates a newOutputViewContainer
object anyway, and the pane is even toggled because it's defined in the constructor, which makes this problem.Workaround
I deleted the line in
activate
function and the annoying restoring seems disappeared 👇Why WIP ? (Remaining work)
The remaining problem now is that when we don't have a restored output view and then call
git-plus:run
, we have to manually create the view by invokinggit-plus:toggle-output-view
in order to see the result, since there is no view yet.I think it's better to create (and toggle) the view when we first call
git-plus:run
by checking if there is an already existing view. But I'm not suregit-plus:run
is the only user command which usesOutputViewComponent
, thus I leave this PR WIP.So, could you tell me all the cases when we use
OutputViewComponent
?? Or does this workaround seem inappropriate this time ?