Commit f2c3278
committed
Fix status bar not updating when workspace is first opened
The status bar cursor position label relied solely on tabBarTabIdSubject
(a PassthroughSubject) and onAppear to get the current tab. When a workspace
was first opened, the selected tab was set during state restoration before the
status bar view subscribed to the subject, causing it to miss the initial value.
This adds an additional onReceive subscriber to the active editor's
$selectedTab publisher, which is a @published property and replays its current
value on subscription, ensuring the status bar updates immediately.
Fixes #17291 parent 07aaee2 commit f2c3278
File tree
1 file changed
+3
-0
lines changed- CodeEdit/Features/StatusBar/Views/StatusBarItems
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
0 commit comments