Created
August 8, 2022 16:10
-
-
Save kirich1409/330eaf442c77f93889ec1d6dd53a70a1 to your computer and use it in GitHub Desktop.
Порефакторил код
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun observe(permissions: List<MintPermission>): Flow<List<MintPermissionStatus>> { | |
return statusesController.observe() | |
.combine(permissions.asFlow()) { statuses, permission -> | |
statuses.getStatus(permission) | |
} | |
.runningList() | |
.distinctUntilChanged() | |
} | |
fun <T> Flow<T>.runningList(): Flow<List<T>> { | |
return flow { | |
emit([email protected]()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment