mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 01:53:39 +00:00
Rename onCreateComposeView
This commit is contained in:
parent
b63f63585b
commit
a2b1a6ad74
@ -55,7 +55,7 @@ import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField
|
|||||||
import org.thoughtcrime.securesms.ui.components.SessionTabRow
|
import org.thoughtcrime.securesms.ui.components.SessionTabRow
|
||||||
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
|
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
|
||||||
import org.thoughtcrime.securesms.ui.contentDescription
|
import org.thoughtcrime.securesms.ui.contentDescription
|
||||||
import org.thoughtcrime.securesms.ui.onCreateView
|
import org.thoughtcrime.securesms.ui.onCreateComposeView
|
||||||
|
|
||||||
class NewMessageFragment : Fragment() {
|
class NewMessageFragment : Fragment() {
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class NewMessageFragment : Fragment() {
|
|||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View = onCreateView {
|
): View = onCreateComposeView {
|
||||||
val uiState by viewModel.state.collectAsState(State())
|
val uiState by viewModel.state.collectAsState(State())
|
||||||
NewMessage(
|
NewMessage(
|
||||||
uiState,
|
uiState,
|
||||||
|
@ -36,7 +36,7 @@ import org.thoughtcrime.securesms.ui.components.AppBar
|
|||||||
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
|
import org.thoughtcrime.securesms.ui.components.SlimOutlineButton
|
||||||
import org.thoughtcrime.securesms.ui.components.SlimOutlineCopyButton
|
import org.thoughtcrime.securesms.ui.components.SlimOutlineCopyButton
|
||||||
import org.thoughtcrime.securesms.ui.contentDescription
|
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.small
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
@ -46,7 +46,7 @@ class InviteFriendFragment : Fragment() {
|
|||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater, container: ViewGroup?,
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View = onCreateView {
|
): View = onCreateComposeView {
|
||||||
InviteFriend(
|
InviteFriend(
|
||||||
TextSecurePreferences.getLocalNumber(LocalContext.current)!!,
|
TextSecurePreferences.getLocalNumber(LocalContext.current)!!,
|
||||||
onBack = { delegate.onDialogBackPressed() },
|
onBack = { delegate.onDialogBackPressed() },
|
||||||
|
@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.Column
|
|||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material.MaterialTheme
|
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
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.AppBar
|
||||||
import org.thoughtcrime.securesms.ui.components.QrImage
|
import org.thoughtcrime.securesms.ui.components.QrImage
|
||||||
import org.thoughtcrime.securesms.ui.contentDescription
|
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.small
|
||||||
import org.thoughtcrime.securesms.ui.xl
|
import org.thoughtcrime.securesms.ui.xl
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -42,7 +41,7 @@ class NewConversationHomeFragment : Fragment() {
|
|||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View = onCreateView { NewConversationScreen() }
|
): View = onCreateComposeView { NewConversationScreen() }
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NewConversationScreen() {
|
fun NewConversationScreen() {
|
||||||
|
@ -11,7 +11,7 @@ fun Activity.setComposeContent(content: @Composable () -> Unit) {
|
|||||||
.let(::setContentView)
|
.let(::setContentView)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Fragment.onCreateView(content: @Composable () -> Unit): ComposeView = ComposeView(requireContext()).apply {
|
fun Fragment.onCreateComposeView(content: @Composable () -> Unit): ComposeView = ComposeView(requireContext()).apply {
|
||||||
setContent {
|
setContent {
|
||||||
SessionMaterialTheme {
|
SessionMaterialTheme {
|
||||||
content()
|
content()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user