Update static/js/07-team-channel-adapter.js

This commit is contained in:
dev 2026-10-31 08:47:44 +00:00
parent 368fd18aa7
commit cb078eacfd

View File

@ -114,25 +114,23 @@ Glow.decorateChannelSelector = () => {
Glow.updateTeamChannelHeader = () => {
const team = Glow.state.activeTeam;
const channel = Glow.state.activeChannel || Glow.state.activeRoom;
const view = Glow.state.activeView;
const isChannelView =
Glow.state.activeView === "channel" ||
Glow.state.activeView === "room";
if (
Glow.state.activeView === "dm" ||
Glow.state.activeView === "dms"
) {
if (view === "dm" || view === "dms" || view === "feed" || view === "pages" || view === "page" || view === "profile" || view === "settings" || view === "thread") {
return;
}
if (!isChannelView || !team || !channel || !Glow.els.headerTitle) {
if (!(view === "channel" || view === "room")) {
return;
}
if (!team || !channel || !Glow.els.headerTitle) {
return;
}
Glow.els.headerTitle.textContent = `# ${channel.name}`;
Glow.els.headerSubtitle.textContent =
`${team.name} · ${channel.description || "Channel conversation"}`;
`${team.name} · ${channel.description || "Channel conversation"}`;
};
Glow.applyComposerVisibility = () => {
@ -347,7 +345,7 @@ Glow.manageTeamMembers = async team => {
row.className = "member-row";
const name = document.createElement("span");
name.textContent = `${member.username} · ${member.membership_role}`;
name.textContent = `${member.username} · ${member.membership_role}`;
const actions = document.createElement("div");
actions.className = "settings-actions";
@ -678,4 +676,4 @@ if (!Glow.teamAdapter.chatBarVisibilityInstalled) {
};
}
Glow.applyComposerVisibility();
Glow.applyComposerVisibility();