MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / UpdateAcknowledgement

Method UpdateAcknowledgement

src/windows/ChannelViewOld.cpp:127–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void ChannelViewOld::UpdateAcknowledgement(Snowflake sf)
128{
129 for (size_t i = 0; i < m_items.size(); i++)
130 {
131 auto& item = m_items[i];
132 if (item.m_id != sf)
133 continue;
134
135 Channel* pChan = GetDiscordInstance()->GetChannel(sf);
136 if (!pChan) {
137 DbgPrintW("ERROR: No channel");
138 break;
139 }
140
141 LPTSTR tstr = ConvertCppStringToTString(GetChannelString(*pChan));
142 // but why can't I just set the string's data?
143 int oldsel = ListBox_GetCurSel(m_listHwnd);
144 ListBox_DeleteString(m_listHwnd, i);
145 ListBox_InsertString(m_listHwnd, i, tstr);
146 ListBox_SetCurSel(m_listHwnd, oldsel);
147 free(tstr);
148 break;
149 }
150}
151
152void ChannelViewOld::AddChannel(const Channel& ch)
153{

Callers

nothing calls this directly

Calls 6

GetDiscordInstanceFunction · 0.85
DbgPrintWFunction · 0.85
GetChannelStringFunction · 0.85
sizeMethod · 0.45
GetChannelMethod · 0.45

Tested by

no test coverage detected