Skip to content

Commit

Permalink
chore: report fully drawn (WPB-274) (#2204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine committed Sep 8, 2023
1 parent 62ff91f commit 4cfebfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/kotlin/com/wire/android/ui/WireActivity.kt
Expand Up @@ -25,6 +25,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.WindowManager
import androidx.activity.compose.ReportDrawnWhen
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -35,9 +36,11 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
Expand Down Expand Up @@ -141,6 +144,7 @@ class WireActivity : AppCompatActivity() {
) {
setContent {
val snackbarHostState = remember { SnackbarHostState() }
var isLoaded by remember { mutableStateOf(false) }

CompositionLocalProvider(
LocalFeatureVisibilityFlags provides FeatureVisibilityFlags,
Expand All @@ -151,6 +155,7 @@ class WireActivity : AppCompatActivity() {
) {
WireTheme {
Column {
ReportDrawnWhen { isLoaded }
val navigator = rememberNavigator(this@WireActivity::finish)
val scope = rememberCoroutineScope()
CommonTopAppBar(
Expand All @@ -167,6 +172,7 @@ class WireActivity : AppCompatActivity() {
// This setup needs to be done after the navigation graph is created, because building the graph takes some time,
// and if any NavigationCommand is executed before the graph is fully built, it will cause a NullPointerException.
setUpNavigation(navigator.navController, onComplete, scope)
isLoaded = true
handleScreenshotCensoring()
handleDialogs(navigator::navigate)
}
Expand Down

0 comments on commit 4cfebfd

Please sign in to comment.