Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-25 17:00:13 +03:00
parent 934fd5cf5f
commit 29ccd49192
10 changed files with 47 additions and 55 deletions

View file

@ -1,34 +1,20 @@
package com.tangem.tap.common.feedback
import com.tangem.core.navigation.email.EmailSender
import com.tangem.domain.feedback.GetFeedbackEmailUseCase
import com.tangem.domain.feedback.SendFeedbackEmailUseCase
import com.tangem.domain.feedback.models.FeedbackEmailType
import com.tangem.tap.common.extensions.inject
import com.tangem.tap.proxy.redux.DaggerGraphState
import com.tangem.tap.scope
import com.tangem.tap.store
import kotlinx.coroutines.launch
/**
[REDACTED_AUTHOR]
*/
class LegacyFeedbackManager(
private val getFeedbackEmailUseCase: GetFeedbackEmailUseCase,
private val sendFeedbackEmailUseCase: SendFeedbackEmailUseCase,
) {
// TODO: [REDACTED_JIRA]
fun sendEmail(type: FeedbackEmailType) {
scope.launch {
val email = getFeedbackEmailUseCase(type = type)
store.inject(DaggerGraphState::emailSender).send(
email = EmailSender.Email(
address = email.address,
subject = email.subject,
message = email.message,
attachment = email.file,
),
)
sendFeedbackEmailUseCase(type = type)
}
}
}