@@ -12,7 +12,7 @@ import { Splitter } from './splitter';
1212import { Toolbar } from './toolbar' ;
1313import { LoadingScreen , LoadingState } from './loading-screen' ;
1414import { InputDialogHandler } from './input-dialog' ;
15- import { RepoWrapper , PatchType } from '../helpers/repo-wrapper' ;
15+ import { RepoWrapper , PatchType , RepoState } from '../helpers/repo-wrapper' ;
1616import { CancellablePromise , makeCancellable } from '../helpers/make-cancellable' ;
1717
1818export interface RepoDashboardProps {
@@ -25,6 +25,7 @@ export interface RepoDashboardProps {
2525}
2626
2727export interface RepoDashboardState {
28+ repoState : RepoState ;
2829 loadingState : LoadingState ;
2930 selectedCommit : Git . Commit | null ;
3031 selectedPatch : Git . ConvenientPatch | null ;
@@ -57,6 +58,7 @@ export class RepoDashboard extends React.PureComponent<RepoDashboardProps, RepoD
5758 this . exitPatchViewer = this . exitPatchViewer . bind ( this ) ;
5859 this . handleRightPanelResize = this . handleRightPanelResize . bind ( this ) ;
5960 this . state = {
61+ repoState : this . props . repo . getState ( ) ,
6062 loadingState : LoadingState . NotLoading ,
6163 selectedCommit : null ,
6264 selectedPatch : null ,
@@ -188,6 +190,9 @@ export class RepoDashboard extends React.PureComponent<RepoDashboardProps, RepoD
188190
189191 async refreshIndex ( ) {
190192 if ( ! this . state . selectedCommit && this . rightViewer . current ) {
193+ this . setState ( {
194+ repoState : this . props . repo . getState ( )
195+ } ) ;
191196 const indexViewer = this . rightViewer . current as IndexViewer ;
192197 await indexViewer . refresh ( ) ;
193198 if ( this . state . selectedPatch && this . state . patchType !== PatchType . Committed ) {
@@ -233,6 +238,7 @@ export class RepoDashboard extends React.PureComponent<RepoDashboardProps, RepoD
233238 leftViewer = < LoadingScreen state = { this . state . loadingState } />
234239 } else {
235240 leftViewer = < GraphViewer repo = { this . props . repo }
241+ repoState = { this . state . repoState }
236242 selectedCommit = { this . state . selectedCommit }
237243 onCommitSelect = { this . handleCommitSelect }
238244 onIndexSelect = { this . handleIndexSelect }
@@ -251,6 +257,7 @@ export class RepoDashboard extends React.PureComponent<RepoDashboardProps, RepoD
251257 ref = { this . rightViewer as React . RefObject < CommitViewer > } />
252258 } else {
253259 rightViewer = < IndexViewer repo = { this . props . repo }
260+ repoState = { this . state . repoState }
254261 selectedPatch = { this . state . selectedPatch }
255262 onPatchSelect = { this . handlePatchSelect }
256263 ref = { this . rightViewer as React . RefObject < IndexViewer > } />
0 commit comments