| 150 | } |
| 151 | |
| 152 | void ChannelViewOld::AddChannel(const Channel& ch) |
| 153 | { |
| 154 | if (!ch.HasPermissionConst(PERM_VIEW_CHANNEL)) |
| 155 | { |
| 156 | // If not a category, return. We'll remove invisible categories without elements after the fact. |
| 157 | if (ch.m_channelType != Channel::CATEGORY) |
| 158 | return; |
| 159 | } |
| 160 | |
| 161 | // TODO: Implement category order sorting. For now, they're sorted by ID. |
| 162 | // 11/06/2025 - Are they!? |
| 163 | int categIndex = ch.IsCategory() ? ch.m_pos : 0; |
| 164 | |
| 165 | m_idToIdx[ch.m_snowflake] = (int) m_items.size(); |
| 166 | m_items.push_back({ ch.m_parentCateg, ch.m_snowflake, ch.m_channelType, GetChannelString(ch), categIndex, ch.m_pos, ch.m_lastSentMsg }); |
| 167 | } |
| 168 | |
| 169 | void ChannelViewOld::RemoveCategoryIfNeeded(const Channel& ch) |
| 170 | { |
nothing calls this directly
no test coverage detected