mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Fix split pane UI not showing after registration on large screen devices.
This commit is contained in:
committed by
Michelle Tang
parent
587c9cb46f
commit
c33716c7b5
@@ -24,7 +24,6 @@ import org.thoughtcrime.securesms.jobs.ConversationShortcutUpdateJob
|
||||
import org.thoughtcrime.securesms.util.ConfigurationUtil
|
||||
import org.thoughtcrime.securesms.util.Debouncer
|
||||
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme
|
||||
import org.thoughtcrime.securesms.window.isLargeScreenSupportEnabled
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
@@ -54,7 +53,7 @@ open class ConversationActivity : PassphraseRequiredActivity(), VoiceNoteMediaCo
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?, ready: Boolean) {
|
||||
if (!ActivityCompat.isLaunchedFromBubble(this) && isLargeScreenSupportEnabled()) {
|
||||
if (!ActivityCompat.isLaunchedFromBubble(this)) {
|
||||
startActivity(
|
||||
MainActivity.clearTop(this).apply {
|
||||
action = ConversationIntents.ACTION
|
||||
|
||||
@@ -347,7 +347,6 @@ import org.thoughtcrime.securesms.util.SignalLocalMetrics
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil
|
||||
import org.thoughtcrime.securesms.util.ViewUtil
|
||||
import org.thoughtcrime.securesms.util.WindowUtil
|
||||
import org.thoughtcrime.securesms.util.atMidnight
|
||||
import org.thoughtcrime.securesms.util.atUTC
|
||||
import org.thoughtcrime.securesms.util.doAfterNextLayout
|
||||
@@ -370,7 +369,6 @@ import org.thoughtcrime.securesms.verify.VerifyIdentityActivity
|
||||
import org.thoughtcrime.securesms.wallpaper.ChatWallpaper
|
||||
import org.thoughtcrime.securesms.wallpaper.ChatWallpaperDimLevelUtil
|
||||
import org.thoughtcrime.securesms.window.getWindowSizeClass
|
||||
import org.thoughtcrime.securesms.window.isLargeScreenSupportEnabled
|
||||
import org.thoughtcrime.securesms.window.isSplitPane
|
||||
import java.time.Instant
|
||||
import java.time.LocalDateTime
|
||||
@@ -714,11 +712,6 @@ class ConversationFragment :
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (!isLargeScreenSupportEnabled()) {
|
||||
WindowUtil.setLightNavigationBarFromTheme(requireActivity())
|
||||
WindowUtil.setLightStatusBarFromTheme(requireActivity())
|
||||
}
|
||||
|
||||
EventBus.getDefault().register(this)
|
||||
|
||||
groupCallViewModel.peekGroupCall()
|
||||
@@ -1514,16 +1507,12 @@ class ConversationFragment :
|
||||
}
|
||||
|
||||
private fun presentNavigationIconForNormal() {
|
||||
if (isLargeScreenSupportEnabled()) {
|
||||
lifecycleScope.launch {
|
||||
repeatOnLifecycle(Lifecycle.State.RESUMED) {
|
||||
mainNavigationViewModel.isFullScreenPane.collect { isFullScreenPane ->
|
||||
updateNavigationIconForNormal(isFullScreenPane)
|
||||
}
|
||||
lifecycleScope.launch {
|
||||
repeatOnLifecycle(Lifecycle.State.RESUMED) {
|
||||
mainNavigationViewModel.isFullScreenPane.collect { isFullScreenPane ->
|
||||
updateNavigationIconForNormal(isFullScreenPane)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
updateNavigationIconForNormal(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3676,11 +3665,6 @@ class ConversationFragment :
|
||||
getVoiceNoteMediaController().resumePlayback(selectedConversationModel.audioUri, messageRecord.id)
|
||||
}
|
||||
|
||||
if (!isLargeScreenSupportEnabled()) {
|
||||
WindowUtil.setLightStatusBarFromTheme(requireActivity())
|
||||
WindowUtil.setLightNavigationBarFromTheme(requireActivity())
|
||||
}
|
||||
|
||||
clearFocusedItem()
|
||||
|
||||
if (mp4Holder != null) {
|
||||
@@ -4730,9 +4714,11 @@ class ConversationFragment :
|
||||
binding.navBar.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.signal_background_primary))
|
||||
}
|
||||
}
|
||||
|
||||
MEDIA_KEYBOARD_FRAGMENT_CREATOR_ID -> {
|
||||
binding.navBar.setBackgroundColor(ThemeUtil.getThemedColor(requireContext(), R.attr.mediaKeyboardBottomBarBackgroundColor))
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.w(TAG, "Not setting navbar coloring for unknown creator id $fragmentCreatorId")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user