Skip to content

Commit

Permalink
fix: Remove reportDrawnWhen api due to crash on Android 9 (#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine authored Dec 15, 2023
1 parent f795076 commit 26be39e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions app/src/main/kotlin/com/wire/android/ui/WireActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ 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 @@ -38,10 +37,8 @@ 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.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -165,7 +162,6 @@ class WireActivity : AppCompatActivity() {
) {
setContent {
val snackbarHostState = remember { SnackbarHostState() }
var isLoaded by remember { mutableStateOf(false) }

LaunchedEffect(viewModel.globalAppState.themeOption) {
when (viewModel.globalAppState.themeOption) {
Expand All @@ -184,7 +180,6 @@ class WireActivity : AppCompatActivity() {
) {
WireTheme {
Column(modifier = Modifier.statusBarsPadding()) {
ReportDrawnWhen { isLoaded }
val navigator = rememberNavigator(this@WireActivity::finish)
CommonTopAppBar(
connectivityUIState = commonTopAppBarViewModel.connectivityState,
Expand All @@ -200,7 +195,6 @@ 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)
isLoaded = true
handleScreenshotCensoring()
handleDialogs(
navigator::navigate,
Expand Down

0 comments on commit 26be39e

Please sign in to comment.