//
// GJMessageCell::markAsRead from 0x100258750 to 0x1002587db (139 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GJMessageCell::markAsRead(GJMessageCell *a1)
{
GJUserMessage *m_message; // rax
__int64 v2; // rax
GameLevelManager *v3; // rbx
GJAccountManager *v4; // rax
GJUserScore *v5; // rax
int m_newMsgCount; // edx
m_message = a1->m_message;
if ( !m_message->m_read )
{
m_message->m_read = 1;
v2 = ((__int64 (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->getChildByTag)(a1->m_mainLayer, 100);
if ( v2 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2 + 328LL))(v2, 0);
v3 = GameLevelManager::sharedState();
v4 = GJAccountManager::sharedState();
v5 = GameLevelManager::userInfoForAccountID(v3, v4->m_accountID - v4->m_unkInt1);
if ( v5 )
{
m_newMsgCount = 1;
if ( v5->m_newMsgCount >= 2 )
m_newMsgCount = v5->m_newMsgCount;
v5->m_newMsgCount = m_newMsgCount - 1;
}
}
}