Skip to content

Commit

Permalink
fix: first Screenshot taken in the app is sometimes black
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadJaara committed Nov 21, 2023
1 parent c44dd05 commit a7a9632
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ internal class ObserveScreenshotCensoringConfigUseCaseImpl(
override suspend fun invoke(): Flow<ObserveScreenshotCensoringConfigResult> {
return combine(
userConfigRepository.observeScreenshotCensoringConfig()
.mapToRightOr(true), // for safety it's set to true if we can't determine it
.mapToRightOr(false),
userConfigRepository.observeTeamSettingsSelfDeletingStatus()
.mapRight { it.enforcedSelfDeletionTimer is TeamSelfDeleteTimer.Enforced }
.mapToRightOr(true), // for safety it's set to true if we can't determine it
.mapToRightOr(false)
) { screenshotCensoringEnabled, teamSelfDeletingEnforced ->
when {
teamSelfDeletingEnforced -> ObserveScreenshotCensoringConfigResult.Enabled.EnforcedByTeamSelfDeletingSettings
Expand Down

0 comments on commit a7a9632

Please sign in to comment.