Rename onCreateComposeView

This commit is contained in:
Andrew 2024-06-14 15:21:43 +09:30
parent b63f63585b
commit a2b1a6ad74
4 changed files with 7 additions and 8 deletions

View File

@ -55,7 +55,7 @@ import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField
import org.thoughtcrime.securesms.ui.components.SessionTabRow
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
import org.thoughtcrime.securesms.ui.contentDescription
import org.thoughtcrime.securesms.ui.onCreateView
import org.thoughtcrime.securesms.ui.onCreateComposeView
class NewMessageFragment : Fragment() {
@ -76,7 +76,7 @@ class NewMessageFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View = onCreateView {
): View = onCreateComposeView {
val uiState by viewModel.state.collectAsState(State())
NewMessage(
uiState,

View File

@ -36,7 +36,7 @@ import org.thoughtcrime.securesms.ui.components.AppBar
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
import org.thoughtcrime.securesms.ui.components.SlimOutlineCopyButton
import org.thoughtcrime.securesms.ui.contentDescription
import org.thoughtcrime.securesms.ui.onCreateView
import org.thoughtcrime.securesms.ui.onCreateComposeView
import org.thoughtcrime.securesms.ui.small
@AndroidEntryPoint
@ -46,7 +46,7 @@ class InviteFriendFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View = onCreateView {
): View = onCreateComposeView {
InviteFriend(
TextSecurePreferences.getLocalNumber(LocalContext.current)!!,
onBack = { delegate.onDialogBackPressed() },

View File

@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@ -25,7 +24,7 @@ import org.thoughtcrime.securesms.ui.LocalDimensions
import org.thoughtcrime.securesms.ui.components.AppBar
import org.thoughtcrime.securesms.ui.components.QrImage
import org.thoughtcrime.securesms.ui.contentDescription
import org.thoughtcrime.securesms.ui.onCreateView
import org.thoughtcrime.securesms.ui.onCreateComposeView
import org.thoughtcrime.securesms.ui.small
import org.thoughtcrime.securesms.ui.xl
import javax.inject.Inject
@ -42,7 +41,7 @@ class NewConversationHomeFragment : Fragment() {
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View = onCreateView { NewConversationScreen() }
): View = onCreateComposeView { NewConversationScreen() }
@Composable
fun NewConversationScreen() {

View File

@ -11,7 +11,7 @@ fun Activity.setComposeContent(content: @Composable () -> Unit) {
.let(::setContentView)
}
fun Fragment.onCreateView(content: @Composable () -> Unit): ComposeView = ComposeView(requireContext()).apply {
fun Fragment.onCreateComposeView(content: @Composable () -> Unit): ComposeView = ComposeView(requireContext()).apply {
setContent {
SessionMaterialTheme {
content()