mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Wait a bit before turning status bar green in MainActivity to give time to start CallActivity that will change it back to orange anyway
This commit is contained in:
parent
bef704d445
commit
46c3ed0b0d
1 changed files with 12 additions and 1 deletions
|
|
@ -34,6 +34,10 @@ import androidx.lifecycle.ViewModelProvider
|
|||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.findNavController
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.R
|
||||
import org.linphone.databinding.MainActivityBinding
|
||||
|
|
@ -77,7 +81,14 @@ class MainActivity : AppCompatActivity() {
|
|||
} else {
|
||||
AppUtils.getColor(R.color.orange_main_500)
|
||||
}
|
||||
window.statusBarColor = color
|
||||
lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
delay(if (useInCallColor) 1000 else 0)
|
||||
withContext(Dispatchers.Main) {
|
||||
window.statusBarColor = color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue