diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/NewUserMetadataScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/NewUserMetadataScreen.kt index 9466edba28..2725f87f2a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/NewUserMetadataScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/NewUserMetadataScreen.kt @@ -117,231 +117,231 @@ fun NewUserMetadataScreen( Column( modifier = Modifier.padding(10.dp).verticalScroll(rememberScrollState()), ) { - // -- Profile (always visible) -- - OutlinedTextField( - label = { Text(text = stringRes(R.string.username)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.name.value, - onValueChange = { postViewModel.name.value = it }, - placeholder = { - Text( - text = stringRes(R.string.my_name), - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - prefix = { Text("@") }, - keyboardOptions = - KeyboardOptions.Default.copy( - capitalization = KeyboardCapitalization.Sentences, - ), - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.display_name)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.displayName.value, - onValueChange = { postViewModel.displayName.value = it }, - placeholder = { - Text( - text = stringRes(R.string.my_display_name), - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - keyboardOptions = - KeyboardOptions.Default.copy( - capitalization = KeyboardCapitalization.Sentences, - ), - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.about_me)) }, - modifier = Modifier.fillMaxWidth().height(100.dp), - value = postViewModel.about.value, - onValueChange = { postViewModel.about.value = it }, - placeholder = { - Text( - text = stringRes(id = R.string.about_me), - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - keyboardOptions = - KeyboardOptions.Default.copy( - capitalization = KeyboardCapitalization.Sentences, - ), - maxLines = 10, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.avatar_url)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.picture.value, - onValueChange = { postViewModel.picture.value = it }, - placeholder = { - Text( - text = "https://mywebsite.com/me.jpg", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - leadingIcon = { - SelectSingleFromGallery( - isUploading = postViewModel.isUploadingImageForPicture, - tint = MaterialTheme.colorScheme.placeholderText, - modifier = Modifier.padding(start = 5.dp), - ) { - postViewModel.uploadForPicture(it, context, onError = accountViewModel.toastManager::toast) - } - }, - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.banner_url)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.banner.value, - onValueChange = { postViewModel.banner.value = it }, - placeholder = { - Text( - text = "https://mywebsite.com/mybanner.jpg", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - leadingIcon = { - SelectSingleFromGallery( - isUploading = postViewModel.isUploadingImageForBanner, - tint = MaterialTheme.colorScheme.placeholderText, - modifier = Modifier.padding(start = 5.dp), - ) { - postViewModel.uploadForBanner(it, context, onError = accountViewModel.toastManager::toast) - } - }, - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.lightning_address)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.lnAddress.value, - onValueChange = { postViewModel.lnAddress.value = it }, - placeholder = { - Text( - text = "me@mylightningnode.com", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.nip_05) + " (NIP-05)") }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.nip05.value, - onValueChange = { postViewModel.nip05.value = it }, - placeholder = { - Text( - text = "_@mywebsite.com", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.website_url)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.website.value, - onValueChange = { postViewModel.website.value = it }, - placeholder = { - Text( - text = "https://mywebsite.com", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - singleLine = true, - ) - - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedTextField( - label = { Text(text = stringRes(R.string.pronouns)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.pronouns.value, - onValueChange = { postViewModel.pronouns.value = it }, - placeholder = { - Text( - text = "they/them, ...", - color = MaterialTheme.colorScheme.placeholderText, - ) - }, - singleLine = true, - ) - - // -- Social Proofs -- - ExpandableSection( - title = stringRes(R.string.social_proof), - expanded = socialExpanded, - ) { + // -- Profile (always visible) -- OutlinedTextField( - label = { Text(text = stringRes(R.string.twitter)) }, + label = { Text(text = stringRes(R.string.username)) }, modifier = Modifier.fillMaxWidth(), - value = postViewModel.twitter.value, - onValueChange = { postViewModel.twitter.value = it }, + value = postViewModel.name.value, + onValueChange = { postViewModel.name.value = it }, placeholder = { Text( - text = stringRes(R.string.twitter_proof_url_template), + text = stringRes(R.string.my_name), color = MaterialTheme.colorScheme.placeholderText, ) }, + prefix = { Text("@") }, + keyboardOptions = + KeyboardOptions.Default.copy( + capitalization = KeyboardCapitalization.Sentences, + ), + singleLine = true, ) Spacer(modifier = Modifier.height(10.dp)) OutlinedTextField( - label = { Text(text = stringRes(R.string.mastodon)) }, + label = { Text(text = stringRes(R.string.display_name)) }, modifier = Modifier.fillMaxWidth(), - value = postViewModel.mastodon.value, - onValueChange = { postViewModel.mastodon.value = it }, + value = postViewModel.displayName.value, + onValueChange = { postViewModel.displayName.value = it }, placeholder = { Text( - text = stringRes(R.string.mastodon_proof_url_template), + text = stringRes(R.string.my_display_name), color = MaterialTheme.colorScheme.placeholderText, ) }, + keyboardOptions = + KeyboardOptions.Default.copy( + capitalization = KeyboardCapitalization.Sentences, + ), + singleLine = true, ) Spacer(modifier = Modifier.height(10.dp)) OutlinedTextField( - label = { Text(text = stringRes(R.string.github)) }, - modifier = Modifier.fillMaxWidth(), - value = postViewModel.github.value, - onValueChange = { postViewModel.github.value = it }, + label = { Text(text = stringRes(R.string.about_me)) }, + modifier = Modifier.fillMaxWidth().height(100.dp), + value = postViewModel.about.value, + onValueChange = { postViewModel.about.value = it }, placeholder = { Text( - text = stringRes(R.string.github_proof_url_template), + text = stringRes(id = R.string.about_me), color = MaterialTheme.colorScheme.placeholderText, ) }, + keyboardOptions = + KeyboardOptions.Default.copy( + capitalization = KeyboardCapitalization.Sentences, + ), + maxLines = 10, ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.avatar_url)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.picture.value, + onValueChange = { postViewModel.picture.value = it }, + placeholder = { + Text( + text = "https://mywebsite.com/me.jpg", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + leadingIcon = { + SelectSingleFromGallery( + isUploading = postViewModel.isUploadingImageForPicture, + tint = MaterialTheme.colorScheme.placeholderText, + modifier = Modifier.padding(start = 5.dp), + ) { + postViewModel.uploadForPicture(it, context, onError = accountViewModel.toastManager::toast) + } + }, + singleLine = true, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.banner_url)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.banner.value, + onValueChange = { postViewModel.banner.value = it }, + placeholder = { + Text( + text = "https://mywebsite.com/mybanner.jpg", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + leadingIcon = { + SelectSingleFromGallery( + isUploading = postViewModel.isUploadingImageForBanner, + tint = MaterialTheme.colorScheme.placeholderText, + modifier = Modifier.padding(start = 5.dp), + ) { + postViewModel.uploadForBanner(it, context, onError = accountViewModel.toastManager::toast) + } + }, + singleLine = true, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.lightning_address)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.lnAddress.value, + onValueChange = { postViewModel.lnAddress.value = it }, + placeholder = { + Text( + text = "me@mylightningnode.com", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + singleLine = true, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.nip_05) + " (NIP-05)") }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.nip05.value, + onValueChange = { postViewModel.nip05.value = it }, + placeholder = { + Text( + text = "_@mywebsite.com", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + singleLine = true, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.website_url)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.website.value, + onValueChange = { postViewModel.website.value = it }, + placeholder = { + Text( + text = "https://mywebsite.com", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + singleLine = true, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.pronouns)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.pronouns.value, + onValueChange = { postViewModel.pronouns.value = it }, + placeholder = { + Text( + text = "they/them, ...", + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + singleLine = true, + ) + + // -- Social Proofs -- + ExpandableSection( + title = stringRes(R.string.social_proof), + expanded = socialExpanded, + ) { + OutlinedTextField( + label = { Text(text = stringRes(R.string.twitter)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.twitter.value, + onValueChange = { postViewModel.twitter.value = it }, + placeholder = { + Text( + text = stringRes(R.string.twitter_proof_url_template), + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.mastodon)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.mastodon.value, + onValueChange = { postViewModel.mastodon.value = it }, + placeholder = { + Text( + text = stringRes(R.string.mastodon_proof_url_template), + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + ) + + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedTextField( + label = { Text(text = stringRes(R.string.github)) }, + modifier = Modifier.fillMaxWidth(), + value = postViewModel.github.value, + onValueChange = { postViewModel.github.value = it }, + placeholder = { + Text( + text = stringRes(R.string.github_proof_url_template), + color = MaterialTheme.colorScheme.placeholderText, + ) + }, + ) + } } } } - } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/AdaptiveScaffold.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/AdaptiveScaffold.kt index d706b08c51..7602a13d92 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/AdaptiveScaffold.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/AdaptiveScaffold.kt @@ -24,7 +24,6 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteScaffold -import androidx.compose.material3.adaptive.navigationsuite.NavigationSuiteType import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.compositionLocalOf diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt index 0c5292c6d5..e3549b2244 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt @@ -35,13 +35,13 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext -import androidx.navigation.NavBackStackEntry -import androidx.navigation.NavDestination.Companion.hasRoute -import androidx.navigation.compose.currentBackStackEntryAsState import androidx.core.net.toUri import androidx.core.util.Consumer +import androidx.navigation.NavBackStackEntry +import androidx.navigation.NavDestination.Companion.hasRoute import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable +import androidx.navigation.compose.currentBackStackEntryAsState import com.vitorpamplona.amethyst.Amethyst import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.service.crashreports.DisplayCrashMessages @@ -52,7 +52,6 @@ import com.vitorpamplona.amethyst.ui.broadcast.DisplayBroadcastProgress import com.vitorpamplona.amethyst.ui.components.getActivity import com.vitorpamplona.amethyst.ui.components.toasts.DisplayErrorMessages import com.vitorpamplona.amethyst.ui.layouts.AdaptiveScaffold -import com.vitorpamplona.amethyst.ui.layouts.isCompactWindow import com.vitorpamplona.amethyst.ui.navigation.navs.Nav import com.vitorpamplona.amethyst.ui.navigation.navs.rememberNav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -159,196 +158,196 @@ fun AppNavigation( enterTransition = { fadeIn(animationSpec = tween(200)) }, exitTransition = { fadeOut(animationSpec = tween(200)) }, ) { - composable { HomeScreen(accountViewModel, nav) } - composable { MessagesScreen(accountViewModel, nav) } - composable { VideoScreen(accountViewModel, nav) } - composable { DiscoverScreen(accountViewModel, nav) } - composable { NotificationScreen(accountViewModel, nav) } - composable { ChessLobbyScreen(accountViewModel, nav) } + composable { HomeScreen(accountViewModel, nav) } + composable { MessagesScreen(accountViewModel, nav) } + composable { VideoScreen(accountViewModel, nav) } + composable { DiscoverScreen(accountViewModel, nav) } + composable { NotificationScreen(accountViewModel, nav) } + composable { ChessLobbyScreen(accountViewModel, nav) } - composableFromEnd { ListOfPeopleListsScreen(accountViewModel, nav) } - composableFromEndArgs { PeopleListScreen(it.dTag, accountViewModel, nav) } - composableFromEndArgs { FollowPackScreen(it.dTag, accountViewModel, nav) } - composableFromBottomArgs { FollowListAndPackAndUserScreen(it.userToAdd, accountViewModel, nav) } + composableFromEnd { ListOfPeopleListsScreen(accountViewModel, nav) } + composableFromEndArgs { PeopleListScreen(it.dTag, accountViewModel, nav) } + composableFromEndArgs { FollowPackScreen(it.dTag, accountViewModel, nav) } + composableFromBottomArgs { FollowListAndPackAndUserScreen(it.userToAdd, accountViewModel, nav) } - composableFromBottomArgs { PeopleListMetadataScreen(it.dTag, accountViewModel, nav) } - composableFromBottomArgs { FollowPackMetadataScreen(it.dTag, accountViewModel, nav) } + composableFromBottomArgs { PeopleListMetadataScreen(it.dTag, accountViewModel, nav) } + composableFromBottomArgs { FollowPackMetadataScreen(it.dTag, accountViewModel, nav) } - composableFromEnd { ListOfBookmarkGroupsScreen(accountViewModel, nav) } - composableFromEndArgs { BookmarkGroupScreen(it.dTag, it.bookmarkType, accountViewModel, nav) } - composableFromBottomArgs { BookmarkGroupMetadataScreen(it.dTag, accountViewModel, nav) } - composableFromBottomArgs { PostBookmarkListManagementScreen(it.postId, accountViewModel, nav) } - composableFromBottomArgs { ArticleBookmarkListManagementScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } + composableFromEnd { ListOfBookmarkGroupsScreen(accountViewModel, nav) } + composableFromEndArgs { BookmarkGroupScreen(it.dTag, it.bookmarkType, accountViewModel, nav) } + composableFromBottomArgs { BookmarkGroupMetadataScreen(it.dTag, accountViewModel, nav) } + composableFromBottomArgs { PostBookmarkListManagementScreen(it.postId, accountViewModel, nav) } + composableFromBottomArgs { ArticleBookmarkListManagementScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } - composableFromBottomArgs { ShowQRScreen(it.pubkey, accountViewModel, nav) } + composableFromBottomArgs { ShowQRScreen(it.pubkey, accountViewModel, nav) } - composableFromBottomArgs { PayViaIntentScreen(it.paymentId, accountViewModel, nav) } + composableFromBottomArgs { PayViaIntentScreen(it.paymentId, accountViewModel, nav) } - composableFromBottomArgs { NewUserMetadataScreen(nav, accountViewModel) } - composable { SearchScreen(accountViewModel, nav) } + composableFromBottomArgs { NewUserMetadataScreen(nav, accountViewModel) } + composable { SearchScreen(accountViewModel, nav) } - composableFromEnd { AdaptiveSettingsScreen(accountViewModel, nav) } - composableFromEnd { AccountBackupScreen(accountViewModel, nav) } - composableFromEnd { SecurityFiltersScreen(accountViewModel, nav) } - composableFromEnd { PrivacyOptionsScreen(Amethyst.instance.torPrefs.value, nav) } - composableFromEnd { NamecoinSettingsScreen(Amethyst.instance.namecoinPrefs, nav) } - composableFromEnd { BookmarkListScreen(accountViewModel, nav) } - composableFromEnd { DraftListScreen(accountViewModel, nav) } - composableFromEnd { SettingsScreen(accountViewModel, nav) } - composableFromEnd { UserSettingsScreen(accountViewModel, nav) } - composableFromEnd { ReactionsSettingsScreen(accountViewModel, nav) } - composableFromEnd { ImportFollowListSelectUserScreen(accountViewModel, nav) } - composableFromEndArgs { - ImportFollowListPickFollowsScreen( - accountViewModel.getOrCreateAddressableNote(ContactListEvent.createAddress(it.userHex)), - accountViewModel, - nav, - ) - } + composableFromEnd { AdaptiveSettingsScreen(accountViewModel, nav) } + composableFromEnd { AccountBackupScreen(accountViewModel, nav) } + composableFromEnd { SecurityFiltersScreen(accountViewModel, nav) } + composableFromEnd { PrivacyOptionsScreen(Amethyst.instance.torPrefs.value, nav) } + composableFromEnd { NamecoinSettingsScreen(Amethyst.instance.namecoinPrefs, nav) } + composableFromEnd { BookmarkListScreen(accountViewModel, nav) } + composableFromEnd { DraftListScreen(accountViewModel, nav) } + composableFromEnd { SettingsScreen(accountViewModel, nav) } + composableFromEnd { UserSettingsScreen(accountViewModel, nav) } + composableFromEnd { ReactionsSettingsScreen(accountViewModel, nav) } + composableFromEnd { ImportFollowListSelectUserScreen(accountViewModel, nav) } + composableFromEndArgs { + ImportFollowListPickFollowsScreen( + accountViewModel.getOrCreateAddressableNote(ContactListEvent.createAddress(it.userHex)), + accountViewModel, + nav, + ) + } - composableFromEndArgs { NIP47SetupScreen(accountViewModel, nav, it.nip47) } - composableFromEndArgs { UpdateZapAmountScreen(accountViewModel, nav, it.nip47) } - composableFromEndArgs { AllRelayListScreen(accountViewModel, nav) } - composableFromEndArgs { AllMediaServersScreen(accountViewModel, nav) } - composableFromEndArgs { UpdateReactionTypeScreen(accountViewModel, nav) } + composableFromEndArgs { NIP47SetupScreen(accountViewModel, nav, it.nip47) } + composableFromEndArgs { UpdateZapAmountScreen(accountViewModel, nav, it.nip47) } + composableFromEndArgs { AllRelayListScreen(accountViewModel, nav) } + composableFromEndArgs { AllMediaServersScreen(accountViewModel, nav) } + composableFromEndArgs { UpdateReactionTypeScreen(accountViewModel, nav) } - composableFromEndArgs { DvmContentDiscoveryScreen(it.id, accountViewModel, nav) } - composableFromEndArgs { ProfileScreen(it.id, accountViewModel, nav) } - composableFromEndArgs { ThreadScreen(it.id, accountViewModel, nav) } - composableFromEndArgs { HashtagScreen(it, accountViewModel, nav) } - composableFromEndArgs { GeoHashScreen(it, accountViewModel, nav) } - composableFromEndArgs { RelayFeedScreen(it, accountViewModel, nav) } - composableFromEndArgs { ChessGameScreen(it.gameId, accountViewModel, nav) } - composableFromEndArgs { RelayInformationScreen(it.url, accountViewModel, nav) } - composableFromEndArgs { CommunityScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } - composableFromEndArgs { FollowPackFeedScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } + composableFromEndArgs { DvmContentDiscoveryScreen(it.id, accountViewModel, nav) } + composableFromEndArgs { ProfileScreen(it.id, accountViewModel, nav) } + composableFromEndArgs { ThreadScreen(it.id, accountViewModel, nav) } + composableFromEndArgs { HashtagScreen(it, accountViewModel, nav) } + composableFromEndArgs { GeoHashScreen(it, accountViewModel, nav) } + composableFromEndArgs { RelayFeedScreen(it, accountViewModel, nav) } + composableFromEndArgs { ChessGameScreen(it.gameId, accountViewModel, nav) } + composableFromEndArgs { RelayInformationScreen(it.url, accountViewModel, nav) } + composableFromEndArgs { CommunityScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } + composableFromEndArgs { FollowPackFeedScreen(Address(it.kind, it.pubKeyHex, it.dTag), accountViewModel, nav) } - composableFromEndArgs { ChatroomScreen(it.toKey(), it.message, it.replyId, it.draftId, it.expiresDays, accountViewModel, nav) } - composableFromEndArgs { ChatroomByAuthorScreen(it.id, null, accountViewModel, nav) } + composableFromEndArgs { ChatroomScreen(it.toKey(), it.message, it.replyId, it.draftId, it.expiresDays, accountViewModel, nav) } + composableFromEndArgs { ChatroomByAuthorScreen(it.id, null, accountViewModel, nav) } - composableFromEndArgs { - PublicChatChannelScreen( - it.id, - it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - it.replyTo?.let { hex -> accountViewModel.checkGetOrCreateNote(hex) }, - accountViewModel, - nav, - ) - } + composableFromEndArgs { + PublicChatChannelScreen( + it.id, + it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + it.replyTo?.let { hex -> accountViewModel.checkGetOrCreateNote(hex) }, + accountViewModel, + nav, + ) + } - composableFromEndArgs { - LiveActivityChannelScreen( - Address(it.kind, it.pubKeyHex, it.dTag), - draft = it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - replyTo = it.replyTo?.let { hex -> accountViewModel.checkGetOrCreateNote(hex) }, - accountViewModel, - nav, - ) - } - - composableFromEndArgs { - RelayUrlNormalizer.normalizeOrNull(it.relayUrl)?.let { relay -> - EphemeralChatScreen( - channelId = RoomId(it.id, relay), + composableFromEndArgs { + LiveActivityChannelScreen( + Address(it.kind, it.pubKeyHex, it.dTag), draft = it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, replyTo = it.replyTo?.let { hex -> accountViewModel.checkGetOrCreateNote(hex) }, + accountViewModel, + nav, + ) + } + + composableFromEndArgs { + RelayUrlNormalizer.normalizeOrNull(it.relayUrl)?.let { relay -> + EphemeralChatScreen( + channelId = RoomId(it.id, relay), + draft = it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + replyTo = it.replyTo?.let { hex -> accountViewModel.checkGetOrCreateNote(hex) }, + accountViewModel = accountViewModel, + nav = nav, + ) + } + } + + composableFromBottomArgs { ChannelMetadataScreen(it.id, accountViewModel, nav) } + composableFromBottomArgs { NewEphemeralChatScreen(accountViewModel, nav) } + composableFromBottomArgs { NewGroupDMScreen(it.message, it.attachment, accountViewModel, nav) } + + composableArgs { LoadRedirectScreen(it.id, accountViewModel, nav) } + + composableFromBottomArgs { + GeoHashPostScreen( + geohash = it.geohash, + message = it.message, + attachment = it.attachment?.ifBlank { null }?.toUri(), + reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel, + nav, + ) + } + + composableFromBottomArgs { + NewPublicMessageScreen( + to = it.toKey(), + reply = it.replyId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel = accountViewModel, + nav = nav, + ) + } + + composableFromBottomArgs { + HashtagPostScreen( + hashtag = it.hashtag, + message = it.message, + attachment = it.attachment?.ifBlank { null }?.toUri(), + reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel, + nav, + ) + } + + composableFromBottomArgs { + ReplyCommentPostScreen( + reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + message = it.message, + attachment = it.attachment?.ifBlank { null }?.toUri(), + quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel, + nav, + ) + } + + composableFromBottomArgs { + NewProductScreen( + message = it.message, + attachment = it.attachment?.ifBlank { null }?.toUri(), + quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel, + nav, + ) + } + + composableFromBottomArgs { + ShortNotePostScreen( + message = it.message, + attachment = it.attachment?.ifBlank { null }?.toUri(), + baseReplyTo = it.baseReplyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + fork = it.fork?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + version = it.version?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, + accountViewModel = accountViewModel, + nav = nav, + ) + } + + composableFromBottomArgs { + VoiceReplyScreen( + replyToNoteId = it.replyToNoteId, + recordingFilePath = it.recordingFilePath, + mimeType = it.mimeType, + duration = it.duration, + amplitudesJson = it.amplitudes, accountViewModel = accountViewModel, nav = nav, ) } } - - composableFromBottomArgs { ChannelMetadataScreen(it.id, accountViewModel, nav) } - composableFromBottomArgs { NewEphemeralChatScreen(accountViewModel, nav) } - composableFromBottomArgs { NewGroupDMScreen(it.message, it.attachment, accountViewModel, nav) } - - composableArgs { LoadRedirectScreen(it.id, accountViewModel, nav) } - - composableFromBottomArgs { - GeoHashPostScreen( - geohash = it.geohash, - message = it.message, - attachment = it.attachment?.ifBlank { null }?.toUri(), - reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel, - nav, - ) - } - - composableFromBottomArgs { - NewPublicMessageScreen( - to = it.toKey(), - reply = it.replyId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draftId?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel = accountViewModel, - nav = nav, - ) - } - - composableFromBottomArgs { - HashtagPostScreen( - hashtag = it.hashtag, - message = it.message, - attachment = it.attachment?.ifBlank { null }?.toUri(), - reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel, - nav, - ) - } - - composableFromBottomArgs { - ReplyCommentPostScreen( - reply = it.replyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - message = it.message, - attachment = it.attachment?.ifBlank { null }?.toUri(), - quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel, - nav, - ) - } - - composableFromBottomArgs { - NewProductScreen( - message = it.message, - attachment = it.attachment?.ifBlank { null }?.toUri(), - quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel, - nav, - ) - } - - composableFromBottomArgs { - ShortNotePostScreen( - message = it.message, - attachment = it.attachment?.ifBlank { null }?.toUri(), - baseReplyTo = it.baseReplyTo?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - quote = it.quote?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - fork = it.fork?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - version = it.version?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - draft = it.draft?.let { hex -> accountViewModel.getNoteIfExists(hex) }, - accountViewModel = accountViewModel, - nav = nav, - ) - } - - composableFromBottomArgs { - VoiceReplyScreen( - replyToNoteId = it.replyToNoteId, - recordingFilePath = it.recordingFilePath, - mimeType = it.mimeType, - duration = it.duration, - amplitudesJson = it.amplitudes, - accountViewModel = accountViewModel, - nav = nav, - ) - } - } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt index 03aebf821a..2b24c12d57 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/nip22Comments/GenericCommentPostScreen.kt @@ -49,11 +49,11 @@ import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.ui.actions.uploads.SelectFromFiles -import com.vitorpamplona.amethyst.ui.layouts.MaxWidthContainer import com.vitorpamplona.amethyst.ui.actions.uploads.SelectFromGallery import com.vitorpamplona.amethyst.ui.actions.uploads.SelectedMedia import com.vitorpamplona.amethyst.ui.actions.uploads.TakePictureButton import com.vitorpamplona.amethyst.ui.actions.uploads.TakeVideoButton +import com.vitorpamplona.amethyst.ui.layouts.MaxWidthContainer import com.vitorpamplona.amethyst.ui.navigation.navs.Nav import com.vitorpamplona.amethyst.ui.navigation.topbars.PostingTopBar import com.vitorpamplona.amethyst.ui.note.BaseUserPicture diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountSwitcherAndLeftDrawerLayout.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountSwitcherAndLeftDrawerLayout.kt index e1cf04db80..2d1d4bf88c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountSwitcherAndLeftDrawerLayout.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountSwitcherAndLeftDrawerLayout.kt @@ -21,7 +21,6 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn import androidx.activity.compose.BackHandler -import androidx.compose.material3.DrawerValue import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.ModalNavigationDrawer diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/list/ListOfBookmarkGroupsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/list/ListOfBookmarkGroupsScreen.kt index fd64a215ad..f7bc939b4b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/list/ListOfBookmarkGroupsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/list/ListOfBookmarkGroupsScreen.kt @@ -34,9 +34,9 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.ui.layouts.MaxWidthContainer import com.vitorpamplona.amethyst.model.nip51Lists.BookmarkListState import com.vitorpamplona.amethyst.model.nip51Lists.labeledBookmarkLists.LabeledBookmarkList +import com.vitorpamplona.amethyst.ui.layouts.MaxWidthContainer import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route import com.vitorpamplona.amethyst.ui.navigation.topbars.TopBarWithBackButton diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt index 6686b11bc1..f1179dbed3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/ProfileScreen.kt @@ -63,11 +63,11 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import androidx.window.core.layout.WindowWidthSizeClass import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.ui.layouts.LocalWindowSizeClass import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.model.User import com.vitorpamplona.amethyst.service.relayClient.reqCommand.account.observeAccountIsHiddenUser import com.vitorpamplona.amethyst.ui.feeds.WatchLifecycleAndUpdateModel +import com.vitorpamplona.amethyst.ui.layouts.LocalWindowSizeClass import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.profile.bookmarks.BookmarkTabHeader diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/qrcode/ShowQRScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/qrcode/ShowQRScreen.kt index 8e31bc3187..dc9852f114 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/qrcode/ShowQRScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/qrcode/ShowQRScreen.kt @@ -55,8 +55,8 @@ import com.vitorpamplona.amethyst.model.User import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.observeUserInfo import com.vitorpamplona.amethyst.ui.components.CreateTextWithEmoji import com.vitorpamplona.amethyst.ui.components.RobohashFallbackAsyncImage -import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav import com.vitorpamplona.amethyst.ui.layouts.MaxWidthContainer +import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.topbars.TopBarWithBackButton import com.vitorpamplona.amethyst.ui.note.ArrowBackIcon diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/AllRelayListScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/AllRelayListScreen.kt index 37cc737dd8..f926c9b32a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/AllRelayListScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/AllRelayListScreen.kt @@ -225,129 +225,129 @@ fun MappedAllRelayListView( ).consumeWindowInsets(pad) .imePadding(), ) { - item { - SettingsCategory( - R.string.public_home_section, - R.string.public_home_section_explainer, - SettingsCategoryFirstModifier, - ) - } - renderNip65HomeItems(homeFeedState, nip65ViewModel, accountViewModel, newNav) - - item { - SettingsCategory( - R.string.public_notif_section, - R.string.public_notif_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderNip65NotifItems(notifFeedState, nip65ViewModel, accountViewModel, newNav) - - item { - SettingsCategoryWithButton( - R.string.private_inbox_section, - R.string.private_inbox_section_explainer, - SettingsCategorySpacingModifier, - action = { - ResetDMRelays(dmViewModel) - }, - ) - } - renderDMItems(dmFeedState, dmViewModel, accountViewModel, newNav) - - item { - SettingsCategory( - R.string.private_outbox_section, - R.string.private_outbox_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderPrivateOutboxItems(privateOutboxFeedState, privateOutboxViewModel, accountViewModel, newNav) - - item { - SettingsCategory( - R.string.proxy_section, - R.string.proxy_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderProxyItems(proxyRelays, proxyViewModel, accountViewModel, newNav) - - item { - SettingsCategory( - R.string.broadcast_section, - R.string.broadcast_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderBroadcastItems(broadcastRelays, broadcastViewModel, accountViewModel, newNav) - - item { - SettingsCategoryWithButton( - R.string.indexer_section, - R.string.indexer_section_explainer, - SettingsCategorySpacingModifier, - ) { - ResetIndexerRelays(indexerViewModel) + item { + SettingsCategory( + R.string.public_home_section, + R.string.public_home_section_explainer, + SettingsCategoryFirstModifier, + ) } - } - renderIndexerItems(indexerRelays, indexerViewModel, accountViewModel, newNav) + renderNip65HomeItems(homeFeedState, nip65ViewModel, accountViewModel, newNav) - item { - SettingsCategoryWithButton( - R.string.search_section, - R.string.search_section_explainer, - SettingsCategorySpacingModifier, - ) { - ResetSearchRelays(searchViewModel) + item { + SettingsCategory( + R.string.public_notif_section, + R.string.public_notif_section_explainer, + SettingsCategorySpacingModifier, + ) } - } - renderSearchItems(searchFeedState, searchViewModel, accountViewModel, newNav) + renderNip65NotifItems(notifFeedState, nip65ViewModel, accountViewModel, newNav) - item { - SettingsCategory( - R.string.local_section, - R.string.local_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderLocalItems(localFeedState, localViewModel, accountViewModel, newNav) + item { + SettingsCategoryWithButton( + R.string.private_inbox_section, + R.string.private_inbox_section_explainer, + SettingsCategorySpacingModifier, + action = { + ResetDMRelays(dmViewModel) + }, + ) + } + renderDMItems(dmFeedState, dmViewModel, accountViewModel, newNav) - item { - SettingsCategory( - R.string.trusted_section, - R.string.trusted_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderTrustedItems(trustedFeedState, trustedViewModel, accountViewModel, newNav) + item { + SettingsCategory( + R.string.private_outbox_section, + R.string.private_outbox_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderPrivateOutboxItems(privateOutboxFeedState, privateOutboxViewModel, accountViewModel, newNav) - item { - SettingsCategory( - R.string.favorite_section, - R.string.favorite_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderRelayFeedsItems(relayFeedsFeedState, relayFeedsViewModel, accountViewModel, newNav) + item { + SettingsCategory( + R.string.proxy_section, + R.string.proxy_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderProxyItems(proxyRelays, proxyViewModel, accountViewModel, newNav) - item { - SettingsCategory( - R.string.blocked_section, - R.string.blocked_section_explainer, - SettingsCategorySpacingModifier, - ) - } - renderBlockedItems(blockedFeedState, blockedViewModel, accountViewModel, newNav) + item { + SettingsCategory( + R.string.broadcast_section, + R.string.broadcast_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderBroadcastItems(broadcastRelays, broadcastViewModel, accountViewModel, newNav) - item { - SettingsCategory( - R.string.connected_section, - R.string.connected_section_description, - SettingsCategorySpacingModifier, - ) - } - renderConnectedItems(connectedRelays, connectedViewModel, accountViewModel, newNav) + item { + SettingsCategoryWithButton( + R.string.indexer_section, + R.string.indexer_section_explainer, + SettingsCategorySpacingModifier, + ) { + ResetIndexerRelays(indexerViewModel) + } + } + renderIndexerItems(indexerRelays, indexerViewModel, accountViewModel, newNav) + + item { + SettingsCategoryWithButton( + R.string.search_section, + R.string.search_section_explainer, + SettingsCategorySpacingModifier, + ) { + ResetSearchRelays(searchViewModel) + } + } + renderSearchItems(searchFeedState, searchViewModel, accountViewModel, newNav) + + item { + SettingsCategory( + R.string.local_section, + R.string.local_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderLocalItems(localFeedState, localViewModel, accountViewModel, newNav) + + item { + SettingsCategory( + R.string.trusted_section, + R.string.trusted_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderTrustedItems(trustedFeedState, trustedViewModel, accountViewModel, newNav) + + item { + SettingsCategory( + R.string.favorite_section, + R.string.favorite_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderRelayFeedsItems(relayFeedsFeedState, relayFeedsViewModel, accountViewModel, newNav) + + item { + SettingsCategory( + R.string.blocked_section, + R.string.blocked_section_explainer, + SettingsCategorySpacingModifier, + ) + } + renderBlockedItems(blockedFeedState, blockedViewModel, accountViewModel, newNav) + + item { + SettingsCategory( + R.string.connected_section, + R.string.connected_section_description, + SettingsCategorySpacingModifier, + ) + } + renderConnectedItems(connectedRelays, connectedViewModel, accountViewModel, newNav) } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AdaptiveSettingsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AdaptiveSettingsScreen.kt index 1f9da89b6e..e075758e17 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AdaptiveSettingsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AdaptiveSettingsScreen.kt @@ -112,18 +112,58 @@ private fun SettingsDetailContent( nav: INav, ) { when (route) { - is Route.EditRelays -> com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.AllRelayListScreen(accountViewModel, nav) - is Route.EditMediaServers -> com.vitorpamplona.amethyst.ui.actions.mediaServers.AllMediaServersScreen(accountViewModel, nav) - is Route.UpdateReactionType -> com.vitorpamplona.amethyst.ui.note.UpdateReactionTypeScreen(accountViewModel, nav) - is Route.UpdateZapAmount -> UpdateZapAmountScreen(accountViewModel, nav, route.nip47) - is Route.SecurityFilters -> SecurityFiltersScreen(accountViewModel, nav) - is Route.UserSettings -> UserSettingsScreen(accountViewModel, nav) - is Route.AccountBackup -> com.vitorpamplona.amethyst.ui.screen.loggedIn.keyBackup.AccountBackupScreen(accountViewModel, nav) - is Route.PrivacyOptions -> com.vitorpamplona.amethyst.ui.screen.loggedIn.privacy.PrivacyOptionsScreen(Amethyst.instance.torPrefs.value, nav) - is Route.NamecoinSettings -> NamecoinSettingsScreen(Amethyst.instance.namecoinPrefs, nav) - is Route.Settings -> SettingsScreen(accountViewModel, nav) - is Route.ReactionsSettings -> ReactionsSettingsScreen(accountViewModel, nav) - else -> SettingsDetailPlaceholder() + is Route.EditRelays -> { + com.vitorpamplona.amethyst.ui.screen.loggedIn.relays + .AllRelayListScreen(accountViewModel, nav) + } + + is Route.EditMediaServers -> { + com.vitorpamplona.amethyst.ui.actions.mediaServers + .AllMediaServersScreen(accountViewModel, nav) + } + + is Route.UpdateReactionType -> { + com.vitorpamplona.amethyst.ui.note + .UpdateReactionTypeScreen(accountViewModel, nav) + } + + is Route.UpdateZapAmount -> { + UpdateZapAmountScreen(accountViewModel, nav, route.nip47) + } + + is Route.SecurityFilters -> { + SecurityFiltersScreen(accountViewModel, nav) + } + + is Route.UserSettings -> { + UserSettingsScreen(accountViewModel, nav) + } + + is Route.AccountBackup -> { + com.vitorpamplona.amethyst.ui.screen.loggedIn.keyBackup + .AccountBackupScreen(accountViewModel, nav) + } + + is Route.PrivacyOptions -> { + com.vitorpamplona.amethyst.ui.screen.loggedIn.privacy + .PrivacyOptionsScreen(Amethyst.instance.torPrefs.value, nav) + } + + is Route.NamecoinSettings -> { + NamecoinSettingsScreen(Amethyst.instance.namecoinPrefs, nav) + } + + is Route.Settings -> { + SettingsScreen(accountViewModel, nav) + } + + is Route.ReactionsSettings -> { + ReactionsSettingsScreen(accountViewModel, nav) + } + + else -> { + SettingsDetailPlaceholder() + } } }