diff --git a/webui-src/app/main.js b/webui-src/app/main.js index 6804436..c6c12f8 100644 --- a/webui-src/app/main.js +++ b/webui-src/app/main.js @@ -1,7 +1,7 @@ const m = require('mithril'); // Bumped at every change of the web UI (two places used to carry it). -const WEBUI_VERSION = 'v167'; +const WEBUI_VERSION = 'v168'; const login = require('login'); const rs = require('rswebui'); diff --git a/webui-src/app/people/people_state.js b/webui-src/app/people/people_state.js index 9a85823..d319e30 100644 --- a/webui-src/app/people/people_state.js +++ b/webui-src/app/people/people_state.js @@ -407,14 +407,19 @@ function pollDistantChatStatus() { if (session) { session.status = detail.info; + // A status line is a message like any other: when one really lands + // (the helper drops what is already there) the pane has to follow it, + // or "You can talk" sits below the fold and the tunnel looks stuck. + let statusLineAdded = false; if (detail.info.status === 2) { - addSessionSystemMessage(session, 'Tunnel is secured. You can talk!'); + statusLineAdded = addSessionSystemMessage(session, 'Tunnel is secured. You can talk!'); // The tunnel just went up: anything the peer sent while it was still // pending is waiting in the event buffer. drainBufferedChatMessages(session); } else if (detail.info.status === 3) { - addSessionSystemMessage(session, 'Your partner closed the conversation.'); + statusLineAdded = addSessionSystemMessage(session, 'Your partner closed the conversation.'); } + if (statusLineAdded && State.selectedId === askedFor) scrollChatToBottom(); } m.redraw(); }