Updated on 2026-08-14

This commit is contained in:
Tangem 2023-06-06 16:07:14 +03:00
parent c0bc4ddf52
commit 35ea095482

View file

@ -0,0 +1,29 @@
package com.tangem.tap.features.intentHandler
import android.content.Intent
/**
[REDACTED_AUTHOR]
*/
class MainIntentHandler {
private val intentHandlers = mutableListOf<IntentHandler>()
fun addHandler(handler: IntentHandler) {
intentHandlers.add(handler)
}
fun removeIntentHandler(handler: IntentHandler) {
intentHandlers.remove(handler)
}
fun removeAll() {
intentHandlers.clear()
}
suspend fun handleIntent(intent: Intent?) {
intentHandlers.toList().forEach {
it.handleIntent(intent)
}
}
}