PIN : branch the mandatory flow
This commit is contained in:
parent
d2d6cab839
commit
f1988e3093
13 changed files with 176 additions and 110 deletions
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package io.element.android.features.lockscreen.api
|
||||
|
||||
sealed interface LockScreenState {
|
||||
data object Unlocked : LockScreenState
|
||||
data object Locked : LockScreenState
|
||||
sealed interface LockScreenLockState {
|
||||
data object Unlocked : LockScreenLockState
|
||||
data object Locked : LockScreenLockState
|
||||
}
|
||||
|
|
@ -18,9 +18,15 @@ package io.element.android.features.lockscreen.api
|
|||
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
interface LockScreenStateService {
|
||||
val state: StateFlow<LockScreenState>
|
||||
interface LockScreenService {
|
||||
/**
|
||||
* The current lock state of the app.
|
||||
*/
|
||||
val lockState: StateFlow<LockScreenLockState>
|
||||
|
||||
suspend fun entersForeground()
|
||||
suspend fun entersBackground()
|
||||
/**
|
||||
* Check if setting up the lock screen is required.
|
||||
* @return true if the lock screen is mandatory and not setup yet, false otherwise.
|
||||
*/
|
||||
suspend fun isSetupRequired(): Boolean
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue