()
| 141 | } |
| 142 | |
| 143 | function selectNextThread() { |
| 144 | const index = threads.findIndex( |
| 145 | (thread) => thread.id === currentThreadId |
| 146 | ); |
| 147 | if (index < threads.length - 1) { |
| 148 | const threadId = threads[index + 1].id; |
| 149 | setCurrentThreadId(threadId); |
| 150 | scrollToBottomThread(threadId); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | if (currentThreadId && (event.key === 'ArrowUp' || event.key === 'k')) { |
| 155 | selectPreviousThread(); |
no test coverage detected