Skip to content

Commit

Permalink
Removed unnecessary changes and applied ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-SD committed Aug 28, 2024
1 parent ac70f2c commit e6ba3e5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class ComponentPlatformApi(
currentComponent = null
googlePayComponentManager.onDispose(componentId)
instantComponentManager.onDispose(componentId)
actionComponentManager.onDispose(componentId)
}

fun handleActivityResult(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ internal class ActionComponentManager(
private val componentFlutterApi: ComponentFlutterInterface,
private val assignCurrentComponent: (ActionHandlingComponent?) -> Unit,
) {
private var componentId: String? = null
private var actionComponent: GenericActionComponent? = null

fun handleAction(
actionComponentConfigurationDTO: ActionComponentConfigurationDTO,
componentId: String,
Expand All @@ -37,7 +34,6 @@ internal class ActionComponentManager(
val actionComponent = createActionComponent(checkoutConfiguration, componentId)
val action = Action.SERIALIZER.deserialize(JSONObject(actionResponse))
if (actionComponent.canHandleAction(action)) {
this.componentId = componentId
assignCurrentComponent(actionComponent)
ComponentLoadingBottomSheet.show(activity.supportFragmentManager, actionComponent)
actionComponent.handleAction(action, activity)
Expand All @@ -49,13 +45,6 @@ internal class ActionComponentManager(
}
}

fun onDispose(componentId: String) {
if (componentId == this.componentId) {
actionComponent = null
this.componentId = null
}
}

private fun createActionComponent(
checkoutConfiguration: CheckoutConfiguration,
componentId: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.FragmentManager
import com.adyen.checkout.action.core.GenericActionComponent
import com.adyen.checkout.components.core.internal.Component
import com.adyen.checkout.flutter.R
import com.adyen.checkout.ui.core.AdyenComponentView
Expand All @@ -24,7 +23,7 @@ internal class ComponentLoadingBottomSheet<T> : BottomSheetDialogFragment() wher
view: View,
savedInstanceState: Bundle?
) {
//We need to cast the component because it has two types T (ViewableComponent and Component)
// We need to cast the component because it has two types T (ViewableComponent and Component)
(component as? T)?.let {
view.findViewById<AdyenComponentView>(R.id.adyen_component_view)?.attach(it, viewLifecycleOwner)
isCancelable = false
Expand Down

0 comments on commit e6ba3e5

Please sign in to comment.