Public Access
Desktop: stop the status bar's session timer when the shell ends
This commit is contained in:
1 parent
619f49a35a
commit
22b4d82ba8
3 files changed
+29
-3
No files matched your search
@@ -4518,7 +4518,7 @@ internal sealed partial class MainWindowViewModel : ObservableObject, IAsyncDisp
|
||||
{
|
||||
if (Tabs.FirstOrDefault(tab => tab.SessionId == e.SessionId) is { } tab)
|
||||
{
|
||||
tab.Ended(e.Outcome.End, e.Outcome.Description);
|
||||
tab.Ended(e.Outcome.End, e.Outcome.Description, clock.GetUtcNow());
|
||||
|
||||
// Only for the tab being looked at, which is what these three already ask. The rectangle does not
|
||||
// change — a dead tab keeps its pane and its scrollback — but the status bar under it does, and
|
||||
@@ -4998,7 +4998,12 @@ internal sealed partial class MainWindowViewModel : ObservableObject, IAsyncDisp
|
||||
return null;
|
||||
}
|
||||
|
||||
var elapsed = clock.GetUtcNow() - started;
|
||||
// Up to the end, for a shell that has one: how long it ran, not how long ago it started.
|
||||
var until = Surface is ShellSurface.Terminal && SelectedTab?.EndedAt is { } ended
|
||||
? ended
|
||||
: clock.GetUtcNow();
|
||||
|
||||
var elapsed = until - started;
|
||||
|
||||
if (elapsed < TimeSpan.Zero)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user