Changing Input Mapping Context Trigger Values Dynamically through C++?

Context: So I’m trying to create a gameplay feature where a player has to hold down a button for some amount of set time before having to release to take a picture. I’m using the enhanced input system so this charge time is basically what the “Hold and Release” Hold Time Threshold value is set to.

Question: What I’m wondering is that I have a field in my c++ component called ChargeTime. I want designers to be able to change this value and have that automatically change the Hold Time Threshold value that is set in my Input Mapping Context. I have already done it like this through the OnRegister function on Components.

TArray<FEnhancedActionKeyMapping> AllMappings = InputMapping->GetMappings();

FEnhancedActionKeyMapping Mapping = *AllMappings.FindByPredicate(
     [this](FEnhancedActionKeyMapping& Mapping) {
     return UseCameraAction == Mapping.Action;});

for (TObjectPtr<UInputTrigger> Trigger : Mapping.Triggers)
{
	if(UInputTriggerHoldAndRelease* InputTrigger = 
        Cast<UInputTriggerHoldAndRelease>(Trigger))
	{
		InputTrigger->HoldTimeThreshold = CameraChargeTime;
	}
}

However, I’m curious if there is any better way to have that ChargeTime variable influence the HoldTimeThreshold variable or is this the intended solution… or is this not intended at all??? and if that’s the case what should I do instead.