Skip to content

Commit 31cbb9e

Browse files
committed
不要なwithContextの削除
1 parent 3b63b47 commit 31cbb9e

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

AndroidApp/domain/src/main/kotlin/me/nya_n/notificationnotifier/domain/usecase/impl/NotifyTargetAppNotificationUseCaseImpl.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
package me.nya_n.notificationnotifier.domain.usecase.impl
22

33
import android.app.Notification
4-
import kotlinx.coroutines.CoroutineDispatcher
5-
import kotlinx.coroutines.Dispatchers
6-
import kotlinx.coroutines.withContext
74
import me.nya_n.notificationnotifier.data.repository.AppRepository
85
import me.nya_n.notificationnotifier.domain.usecase.NotifyTargetAppNotificationUseCase
96
import me.nya_n.notificationnotifier.domain.usecase.NotifyUseCase
107

118
class NotifyTargetAppNotificationUseCaseImpl(
129
private val appRepository: AppRepository,
1310
private val notifyUseCase: NotifyUseCase,
14-
private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO
1511
) : NotifyTargetAppNotificationUseCase {
1612
override suspend operator fun invoke(
1713
packageName: String,
@@ -38,10 +34,7 @@ class NotifyTargetAppNotificationUseCaseImpl(
3834
return Result.success(Unit)
3935
}
4036
}
41-
42-
withContext(coroutineDispatcher) {
43-
notifyUseCase("${title}\n${message}")
44-
}
37+
notifyUseCase("${title}\n${message}")
4538
}
4639
}
4740
}

0 commit comments

Comments
 (0)