mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 22:33:38 +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.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,
|
||||
|
@ -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() },
|
||||
|
@ -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() {
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user