forked from melod1n/fast-messenger
Release 0.2.0 (#150)
Release Notes * Bumped haze, agp, and guava dependencies * Implemented ordering functionality for friends list * Added scroll to top feature in friends and conversations screens * Improved messages handling * Fixed coloring issues * Cache improvements * Implemented logout functionality * Implemented new authorization flow (no auto-token re-request) * Added support for sticker pack preview attachments * Bump LongPoll to version 19 * Markdown support for messages bubbles * Adjust app name font size based on screen width --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package dev.meloda.fast.profile.navigation
|
||||
|
||||
import androidx.navigation.NavController
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.navigation.NavGraphBuilder
|
||||
import androidx.navigation.compose.composable
|
||||
import dev.meloda.fast.model.BaseError
|
||||
import dev.meloda.fast.profile.ProfileViewModel
|
||||
import dev.meloda.fast.profile.ProfileViewModelImpl
|
||||
import dev.meloda.fast.profile.presentation.ProfileRoute
|
||||
import dev.meloda.fast.ui.extensions.sharedViewModel
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.koin.androidx.compose.koinViewModel
|
||||
|
||||
@Serializable
|
||||
object Profile
|
||||
@@ -16,12 +17,13 @@ object Profile
|
||||
fun NavGraphBuilder.profileScreen(
|
||||
onError: (BaseError) -> Unit,
|
||||
onSettingsButtonClicked: () -> Unit,
|
||||
onPhotoClicked: (url: String) -> Unit,
|
||||
navController: NavController
|
||||
onPhotoClicked: (url: String) -> Unit
|
||||
) {
|
||||
composable<Profile> {
|
||||
val viewModel: ProfileViewModel =
|
||||
it.sharedViewModel<ProfileViewModelImpl>(navController = navController)
|
||||
val context = LocalContext.current
|
||||
val viewModel: ProfileViewModel = koinViewModel<ProfileViewModelImpl>(
|
||||
viewModelStoreOwner = context as AppCompatActivity
|
||||
)
|
||||
|
||||
ProfileRoute(
|
||||
onError = onError,
|
||||
|
||||
Reference in New Issue
Block a user