mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 18:59:18 +03:00
Rebase master
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
cca6f60ed2
commit
1257ce0675
1 changed files with 11 additions and 4 deletions
|
@ -28,10 +28,12 @@ import android.view.ViewGroup
|
||||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.nextcloud.client.assistant.AssistantScreen
|
import com.nextcloud.client.assistant.AssistantScreen
|
||||||
|
import com.nextcloud.client.assistant.AssistantViewModel
|
||||||
import com.nextcloud.utils.extensions.getSerializableArgument
|
import com.nextcloud.utils.extensions.getSerializableArgument
|
||||||
import com.owncloud.android.databinding.FragmentComposeViewBinding
|
import com.owncloud.android.databinding.FragmentComposeViewBinding
|
||||||
|
import com.owncloud.android.ui.fragment.FileFragment
|
||||||
|
|
||||||
class ComposeFragment : Fragment() {
|
class ComposeFragment : FileFragment() {
|
||||||
|
|
||||||
private var _binding: FragmentComposeViewBinding? = null
|
private var _binding: FragmentComposeViewBinding? = null
|
||||||
|
|
||||||
|
@ -53,12 +55,17 @@ class ComposeFragment : Fragment() {
|
||||||
binding.composeView.apply {
|
binding.composeView.apply {
|
||||||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
||||||
setContent {
|
setContent {
|
||||||
when(destination) {
|
when (destination) {
|
||||||
ComposeDestinations.AssistantScreen -> {
|
ComposeDestinations.AssistantScreen -> {
|
||||||
AssistantScreen()
|
AssistantScreen(
|
||||||
|
viewModel = AssistantViewModel(
|
||||||
|
context = requireContext(),
|
||||||
|
user = containerActivity.storageManager.user
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
else -> {
|
|
||||||
|
|
||||||
|
else -> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue