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() { class CanTogglePushNotificationsViaPusherUseCase @Inject constructor() {
// TODO add unit tests
fun execute(session: Session): Flow<Boolean> { fun execute(session: Session): Flow<Boolean> {
return session return session
.homeServerCapabilitiesService() .homeServerCapabilitiesService()

View file

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

View file

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

View file

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

View file

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