mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +03:00
Adding some TODOs
This commit is contained in:
parent
24a5cfa9e5
commit
6239b3e686
5 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -21,6 +21,7 @@ import javax.inject.Inject
|
|||
|
||||
class CheckIfCanTogglePushNotificationsViaPusherUseCase @Inject constructor() {
|
||||
|
||||
// TODO update unit tests
|
||||
fun execute(session: Session): Boolean {
|
||||
return session
|
||||
.homeServerCapabilitiesService()
|
||||
|
|
|
@ -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) -> {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue