Commit 6a1908b
committed
fix: show connect page in the URI handler
If Toolbox is already opened and URI is executed the setup page
from below is never called. I tried a couple of things, including
yielding the coroutine - but it seems to be of no help. What works
delaying the coroutine for 66 - to 100 milliseconds, these numbers
were determined by trial and error.
The only explanation that I have is that inspecting the TBX bytecode it seems the
UI event is emitted via MutableSharedFlow(replay = 0) which has a buffer of 4 events
and a drop oldest strategy. For some reason it seems that the UI collector
is not yet active, causing the event to be lost unless we wait > 66 ms.
I think this delay ensures the collector is ready before processEvent() is called.1 parent b7e3073 commit 6a1908b
File tree
1 file changed
+13
-0
lines changed- src/main/kotlin/com/coder/toolbox/util
1 file changed
+13
-0
lines changedLines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
0 commit comments