diff --git a/assets/main.css b/assets/main.css index 6e16000..70b781b 100644 --- a/assets/main.css +++ b/assets/main.css @@ -175,6 +175,7 @@ ul#server_selection_list { width: 100%; resize: none; overflow: hidden; + padding: 0.2em 0.3em; } #login { diff --git a/main.js b/main.js index 77bbd13..f15e3a7 100644 --- a/main.js +++ b/main.js @@ -390,11 +390,7 @@ function switchToChannel(client, team, channel) { } } - const [title, elements] = channelNameElements(team, channel); - byId("channel_header").innerHTML = ""; - byId("channel_header").append(...elements); byId("channel_contents").innerText = "Loading…"; - client.channelPosts(channel.id) .then(response => { console.info(`Got channel contents of ${channel.id} (${channel.name})`); @@ -404,6 +400,11 @@ function switchToChannel(client, team, channel) { console.error(error); byId("channel_contents").innerText = `Failed to get channel contents:\n${error.message}`; }); + + const [title, elements] = channelNameElements(team, channel); + byId("channel_header").innerHTML = ""; + byId("channel_header").append(...elements); + byId("compose").setAttribute("placeholder", `Write to ${byId("channel_header").textContent}`); } function updateComposeHeight() {