Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 39e911e

Browse files
committed
Show different message when PR not checked out
Let the user know they need to check out PR branch before navigating to editor.
1 parent ac0116f commit 39e911e

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/GitHub.App/Services/PullRequestEditorService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ void EnableNavigateToEditor(ITextView textView, IPullRequestSession session, IPu
469469
var view = vsEditorAdaptersFactory.GetViewAdapter(textView);
470470
EnableNavigateToEditor(view, session, file);
471471

472+
var statusMessage = session.IsCheckedOut ?
473+
UI.Resources.NavigateToEditorStatusMessage : UI.Resources.NavigateToEditorNotCheckedOutStatusMessage;
472474
textView.GotAggregateFocus += (s, e) =>
473-
statusBar.ShowMessage(VisualStudio.UI.Resources.NavigateToEditorStatusMessage);
475+
StatusBarNotificationService.ShowMessage(statusMessage);
474476

475477
textView.LostAggregateFocus += (s, e) =>
476478
statusBar.ShowMessage(string.Empty);

src/GitHub.VisualStudio.UI/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.VisualStudio.UI/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,7 @@
419419
<data name="NavigateToEditorStatusMessage" xml:space="preserve">
420420
<value>Press Enter to navigate to Editor</value>
421421
</data>
422+
<data name="NavigateToEditorNotCheckedOutStatusMessage" xml:space="preserve">
423+
<value>Checkout PR branch and press Enter to navigate to Editor</value>
424+
</data>
422425
</root>

0 commit comments

Comments
 (0)