//
// GJRequestCell::FLAlert_Clicked from 0x61ca84 to 0x61cc10 (396 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJRequestCell::FLAlert_Clicked @ 0x61cc14
// > ??> @ 0xc5c70
// > ??> @ 0x1150ec0
//
// 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 GJRequestCell::FLAlert_Clicked(GJRequestCell *a1, FLAlertLayer *a2, bool a3)
{
GameLevelManager *v4; // x0
GJFriendRequest *v5; // x21
GameLevelManager *v6; // x0
UploadActionPopup *m_popup; // x0
UploadPopupDelegate_vtbl *v8; // x3
unsigned int *v9; // x2
int onClosePopup; // w0
UploadPopupDelegate v11; // [xsp+40h] [xbp+40h] BYREF
std::string v12; // 0:x2.8
if ( a3 && a2->getTag(a2) == 1 )
{
if ( a1->m_score )
{
v4 = GameLevelManager::sharedState();
v5 = GameLevelManager::friendRequestFromAccountID(v4, a1->m_score->m_accountID);
if ( v5 )
{
GJRequestCell::markAsRead(a1);
GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;
v6 = GameLevelManager::sharedState();
if ( GameLevelManager::deleteFriendRequests(v6, v5->m_accountID, nullptr, 0) )
{
sub_D153B8((int)&v11, "Removing Friend Request...");
m_popup = (UploadActionPopup *)UploadActionPopup::create(
(UploadActionPopup *)&a1->UploadPopupDelegate,
&v11,
v12);
a1->m_popup = m_popup;
v8 = v11.__vftable - 3;
if ( (__int64 *)&v11.__vftable[-3] != &qword_124B6B0 )
{
if ( &pthread_create )
{
v9 = (unsigned int *)&v11.__vftable[-1];
do
onClosePopup = __ldaxr(v9);
while ( __stlxr(onClosePopup - 1, v9) );
}
else
{
onClosePopup = (int)v11.__vftable[-1].onClosePopup;
LODWORD(v11.__vftable[-1].onClosePopup) = onClosePopup - 1;
}
if ( onClosePopup <= 0 )
operator delete(v8);
m_popup = a1->m_popup;
}
m_popup->show(m_popup);
}
}
}
}
}