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

Method OnClickMessage

src/windows/NotificationViewer.cpp:158–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void NotificationViewer::OnClickMessage(Snowflake sf)
159{
160 // Look for the notification with this ID.
161 auto& notifs = GetNotificationManager()->GetNotifications();
162
163 for (auto& notif : notifs)
164 {
165 if (notif.m_sourceMessage != sf)
166 continue;
167
168 // Go there
169 GetDiscordInstance()->JumpToMessage(
170 notif.m_sourceGuild,
171 notif.m_sourceChannel,
172 notif.m_sourceMessage
173 );
174
175 // Mark it as read:
176 notif.m_bRead = true;
177 }
178}
179
180void NotificationViewer::MarkAllAsRead()
181{

Callers

nothing calls this directly

Calls 3

GetNotificationManagerFunction · 0.85
GetDiscordInstanceFunction · 0.85
JumpToMessageMethod · 0.45

Tested by

no test coverage detected