mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 18:05:36 +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() {
|
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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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) -> {
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue