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

Function GetChannelString

src/windows/ChannelViewOld.cpp:109–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static std::string GetChannelString(const Channel& ch)
110{
111 std::string categBeg = ch.IsCategory() ? "--- " : (ch.m_parentCateg ? " " : "");
112 std::string categEnd = ch.IsCategory() ? " ---" : "";
113
114 std::string mentions = "";
115 std::string unreadMarker = "";
116 if (ch.WasMentioned()) {
117 mentions = "(" + toString(ch.m_mentionCount) + ") ";
118 }
119
120 if (ch.HasUnreadMessages()) {
121 unreadMarker = " *";
122 }
123
124 return categBeg + mentions + ch.GetTypeSymbol() + ch.m_name + categEnd + unreadMarker;
125}
126
127void ChannelViewOld::UpdateAcknowledgement(Snowflake sf)
128{

Callers 2

UpdateAcknowledgementMethod · 0.85
AddChannelMethod · 0.85

Calls 5

toStringFunction · 0.85
WasMentionedMethod · 0.80
HasUnreadMessagesMethod · 0.80
GetTypeSymbolMethod · 0.80
IsCategoryMethod · 0.45

Tested by

no test coverage detected