Add TrackedRequest implementation in DTFluxCoreSubsystem and various Modifications and bugfixes.

This commit is contained in:
2025-07-11 23:45:23 +02:00
parent f1f300a351
commit d92ca63ea4
8 changed files with 199 additions and 142 deletions

View File

@ -416,7 +416,7 @@ FSlateColor SDTFluxStatusWidget::GetComboItemRankingColor(const TSharedPtr<FComb
FReply SDTFluxStatusWidget::OnRankingButtonClicked() const
{
if (DTFluxNetwork)
if (DTFluxCore)
{
// Exemple d'envoi de requête basée sur la sélection
int ForContest = SelectedContestComboBoxItem.IsValid() ? SelectedContestComboBoxItem->ContestId : -1;
@ -432,13 +432,19 @@ FReply SDTFluxStatusWidget::OnRankingButtonClicked() const
if (ForStage == -1)
{
UE_LOG(logDTFluxStatus, Warning, TEXT("Stage not selected !!!! Requesting contest Ranking"));
RequestType = EDTFluxApiDataType::ContestRanking;
DTFluxNetwork->SendRequest(RequestType, ForContest);
DTFluxCore->TrackedRequestContestRankings({ForContest});
return FReply::Handled();
}
RequestType = ForSplit == -1 ? EDTFluxApiDataType::StageRanking : EDTFluxApiDataType::SplitRanking;
if (ForSplit == -1)
{
UE_LOG(logDTFluxStatus, Warning, TEXT("Split not selected !!!! Requesting stage Ranking"));
FDTFluxStageKey StageKey = {ForContest, ForStage};
DTFluxCore->TrackedRequestStageRankings({StageKey});
return FReply::Handled();
}
FDTFluxSplitKey SplitKey = {ForContest, ForStage, ForSplit};
DTFluxCore->TrackedRequestSplitRankings({SplitKey});
UE_LOG(logDTFluxStatus, Warning, TEXT("Requesting %s Ranking"), *UEnum::GetValueAsString(RequestType));
DTFluxNetwork->SendRequest(RequestType, ForContest, ForStage, ForSplit);
}
return FReply::Handled();