//
// GJRequestCell::markAsRead from 0x100112154 to 0x1001121e8 (148 bytes)
//
// 2 xrefs:
// > GJRequestCell::onViewFriendRequest @ 0x100112030
// > GJRequestCell::FLAlert_Clicked @ 0x1001122e8
//
// 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 GJRequestCell::markAsRead(GJRequestCell *a1)
{
__int64 v2; // x0
GameLevelManager *v3; // x19
GJAccountManager *v4; // x0
GJUserScore *v5; // x0
int m_friendReqCount; // w8
if ( a1->m_score->m_newFriendRequest )
{
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);
a1->m_score->m_newFriendRequest = 0;
v3 = GameLevelManager::sharedState();
v4 = GJAccountManager::sharedState();
v5 = GameLevelManager::userInfoForAccountID(v3, v4->m_accountID - v4->m_unkInt1);
if ( v5 )
{
m_friendReqCount = v5->m_friendReqCount;
if ( m_friendReqCount <= 1 )
m_friendReqCount = 1;
v5->m_friendReqCount = m_friendReqCount - 1;
}
}
}