Adding some TODOs

This commit is contained in:
Maxime NATUREL 2022-11-03 17:48:49 +01:00
parent 24a5cfa9e5
commit 6239b3e686
5 changed files with 5 additions and 0 deletions

View file

@ -25,6 +25,7 @@ import javax.inject.Inject
class CanTogglePushNotificationsViaPusherUseCase @Inject constructor() {
// TODO add unit tests
fun execute(session: Session): Flow<Boolean> {
return session
.homeServerCapabilitiesService()

View file

@ -22,6 +22,7 @@ import javax.inject.Inject
class CheckIfCanTogglePushNotificationsViaAccountDataUseCase @Inject constructor() {
// TODO update unit tests
fun execute(session: Session, deviceId: String): Boolean {
return session
.accountDataService()

View file

@ -21,6 +21,7 @@ import javax.inject.Inject
class CheckIfCanTogglePushNotificationsViaPusherUseCase @Inject constructor() {
// TODO update unit tests
fun execute(session: Session): Boolean {
return session
.homeServerCapabilitiesService()

View file

@ -34,6 +34,7 @@ class GetNotificationsStatusUseCase @Inject constructor(
private val checkIfCanTogglePushNotificationsViaAccountDataUseCase: CheckIfCanTogglePushNotificationsViaAccountDataUseCase,
) {
// TODO update unit tests
fun execute(session: Session, deviceId: String): Flow<NotificationsStatus> {
return when {
checkIfCanTogglePushNotificationsViaAccountDataUseCase.execute(session, deviceId) -> {

View file

@ -28,6 +28,7 @@ class TogglePushNotificationUseCase @Inject constructor(
private val checkIfCanTogglePushNotificationsViaAccountDataUseCase: CheckIfCanTogglePushNotificationsViaAccountDataUseCase,
) {
// TODO update unit tests
suspend fun execute(deviceId: String, enabled: Boolean) {
val session = activeSessionHolder.getSafeActiveSession() ?: return