@@ -235,7 +235,6 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
235235 }
236236
237237 this . updateBadge ( ) ;
238- this . registerSyncStatusAction ( ) ;
239238 }
240239
241240 private async onDidChangeSessions ( providerId : string ) : Promise < void > {
@@ -746,7 +745,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
746745
747746 private registerSignInAction ( ) : void {
748747 const that = this ;
749- registerAction2 ( class StopSyncAction extends Action2 {
748+ this . _register ( registerAction2 ( class StopSyncAction extends Action2 {
750749 constructor ( ) {
751750 super ( {
752751 id : signInCommand . id ,
@@ -766,7 +765,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
766765 that . notificationService . error ( e ) ;
767766 }
768767 }
769- } ) ;
768+ } ) ) ;
770769 }
771770
772771 private registerShowSettingsConflictsAction ( ) : void {
@@ -824,17 +823,14 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
824823
825824 }
826825
827- private readonly _syncStatusActionDisposable = this . _register ( new MutableDisposable ( ) ) ;
828826 private registerSyncStatusAction ( ) : void {
829827 const that = this ;
830828 const when = ContextKeyExpr . and ( CONTEXT_SYNC_ENABLEMENT , CONTEXT_AUTH_TOKEN_STATE . isEqualTo ( AuthStatus . SignedIn ) , CONTEXT_SYNC_STATE . notEqualsTo ( SyncStatus . Uninitialized ) ) ;
831- this . _syncStatusActionDisposable . value = registerAction2 ( class SyncStatusAction extends Action2 {
829+ this . _register ( registerAction2 ( class SyncStatusAction extends Action2 {
832830 constructor ( ) {
833831 super ( {
834832 id : 'workbench.userData.actions.syncStatus' ,
835- get title ( ) {
836- return getIdentityTitle ( localize ( 'sync is on' , "Sync is on" ) , that . activeAccount ) ;
837- } ,
833+ title : localize ( 'sync is on' , "Sync is on" ) ,
838834 menu : [
839835 {
840836 id : MenuId . GlobalActivity ,
@@ -890,12 +886,12 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
890886 quickPick . show ( ) ;
891887 } ) ;
892888 }
893- } ) ;
889+ } ) ) ;
894890 }
895891
896892 private registerTurnOffSyncAction ( ) : void {
897893 const that = this ;
898- registerAction2 ( class StopSyncAction extends Action2 {
894+ this . _register ( registerAction2 ( class StopSyncAction extends Action2 {
899895 constructor ( ) {
900896 super ( {
901897 id : stopSyncCommand . id ,
@@ -915,12 +911,12 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
915911 }
916912 }
917913 }
918- } ) ;
914+ } ) ) ;
919915 }
920916
921917 private registerConfigureSyncAction ( ) : void {
922918 const that = this ;
923- registerAction2 ( class ShowSyncActivityAction extends Action2 {
919+ this . _register ( registerAction2 ( class ShowSyncActivityAction extends Action2 {
924920 constructor ( ) {
925921 super ( {
926922 id : configureSyncCommand . id ,
@@ -932,12 +928,12 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
932928 } ) ;
933929 }
934930 run ( ) : any { return that . configureSyncOptions ( ) ; }
935- } ) ;
931+ } ) ) ;
936932 }
937933
938934 private registerShowActivityAction ( ) : void {
939935 const that = this ;
940- registerAction2 ( class ShowSyncActivityAction extends Action2 {
936+ this . _register ( registerAction2 ( class ShowSyncActivityAction extends Action2 {
941937 constructor ( ) {
942938 super ( {
943939 id : showSyncActivityCommand . id ,
@@ -949,11 +945,11 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
949945 } ) ;
950946 }
951947 run ( ) : any { return that . showSyncActivity ( ) ; }
952- } ) ;
948+ } ) ) ;
953949 }
954950
955951 private registerShowSettingsAction ( ) : void {
956- registerAction2 ( class ShowSyncSettingsAction extends Action2 {
952+ this . _register ( registerAction2 ( class ShowSyncSettingsAction extends Action2 {
957953 constructor ( ) {
958954 super ( {
959955 id : showSyncSettingsCommand . id ,
@@ -967,7 +963,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
967963 run ( accessor : ServicesAccessor ) : any {
968964 accessor . get ( IPreferencesService ) . openGlobalSettings ( false , { query : '@tag:sync' } ) ;
969965 }
970- } ) ;
966+ } ) ) ;
971967 }
972968
973969}
0 commit comments