diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/mediaServers/AllMediaServersLIstView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/mediaServers/AllMediaServersLIstView.kt index 98887780e..ec03e08da 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/mediaServers/AllMediaServersLIstView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/mediaServers/AllMediaServersLIstView.kt @@ -70,8 +70,8 @@ fun AllMediaBody( ) { item { SettingsCategory( - stringRes(R.string.media_servers_blossom_section), - stringRes(R.string.media_servers_blossom_explainer), + R.string.media_servers_blossom_section, + R.string.media_servers_blossom_explainer, SettingsCategoryFirstModifier, ) } @@ -91,8 +91,8 @@ fun AllMediaBody( item { SettingsCategory( - stringRes(R.string.media_servers_nip96_section), - stringRes(R.string.media_servers_nip96_explainer), + R.string.media_servers_nip96_section, + R.string.media_servers_nip96_explainer, SettingsCategorySpacingModifier, ) } @@ -113,8 +113,8 @@ fun AllMediaBody( DEFAULT_MEDIA_SERVERS.let { item { SettingsCategoryWithButton( - title = stringRes(id = R.string.built_in_media_servers_title), - description = stringRes(id = R.string.built_in_servers_description), + title = R.string.built_in_media_servers_title, + description = R.string.built_in_servers_description, modifier = SettingsCategorySpacingModifier, ) { OutlinedButton( diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/ephemChat/metadata/NewEphemeralChatScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/ephemChat/metadata/NewEphemeralChatScreen.kt index e25b6bcbf..b1d583a9c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/ephemChat/metadata/NewEphemeralChatScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/ephemChat/metadata/NewEphemeralChatScreen.kt @@ -123,8 +123,8 @@ private fun ChannelMetadataScaffold( ) { item { SettingsCategory( - stringRes(R.string.relay_chat_title), - stringRes(R.string.relay_chat_explainer), + R.string.relay_chat_title, + R.string.relay_chat_explainer, SettingsCategoryFirstModifier, ) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/nip28PublicChat/metadata/ChannelMetadataScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/nip28PublicChat/metadata/ChannelMetadataScreen.kt index 9473ddfee..2481cb37c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/nip28PublicChat/metadata/ChannelMetadataScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/nip28PublicChat/metadata/ChannelMetadataScreen.kt @@ -185,8 +185,8 @@ private fun ChannelMetadataScaffold( ) { item { SettingsCategory( - stringRes(R.string.public_chat_title), - stringRes(R.string.public_chat_explainer), + R.string.public_chat_title, + R.string.public_chat_explainer, SettingsCategoryFirstModifier, ) @@ -201,8 +201,8 @@ private fun ChannelMetadataScaffold( Description(postViewModel) SettingsCategory( - stringRes(R.string.public_chat_relays_title), - stringRes(R.string.public_chat_relays_explainer), + R.string.public_chat_relays_title, + R.string.public_chat_relays_explainer, SettingsCategorySpacingModifier, ) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/relays/RelayFeedView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/relays/RelayFeedView.kt index 7b27e87df..3ba91b326 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/relays/RelayFeedView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/profile/relays/RelayFeedView.kt @@ -41,7 +41,6 @@ import com.vitorpamplona.amethyst.ui.navigation.routes.Route import com.vitorpamplona.amethyst.ui.note.RelayCompose import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.SettingsCategory -import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.amethyst.ui.theme.DividerThickness @Composable @@ -64,8 +63,8 @@ fun RelayFeedView( ) { item { SettingsCategory( - stringRes(R.string.public_home_section), - stringRes(R.string.public_home_section_explainer_profile), + R.string.public_home_section, + R.string.public_home_section_explainer_profile, Modifier.padding(top = 10.dp, bottom = 8.dp, start = 10.dp, end = 10.dp), ) } @@ -74,8 +73,8 @@ fun RelayFeedView( } item { SettingsCategory( - stringRes(R.string.public_notif_section), - stringRes(R.string.public_notif_section_explainer_profile), + R.string.public_notif_section, + R.string.public_notif_section_explainer_profile, Modifier.padding(top = 24.dp, bottom = 8.dp, start = 10.dp, end = 10.dp), ) } @@ -84,8 +83,8 @@ fun RelayFeedView( } item { SettingsCategory( - stringRes(R.string.private_inbox_section), - stringRes(R.string.private_inbox_section_explainer_profile), + R.string.private_inbox_section, + R.string.private_inbox_section_explainer_profile, Modifier.padding(top = 24.dp, bottom = 8.dp, start = 10.dp, end = 10.dp), ) } 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 0f86454ea..a702f0dc6 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 @@ -215,8 +215,8 @@ fun MappedAllRelayListView( ) { item { SettingsCategory( - stringRes(R.string.public_home_section), - stringRes(R.string.public_home_section_explainer), + R.string.public_home_section, + R.string.public_home_section_explainer, SettingsCategoryFirstModifier, ) } @@ -224,8 +224,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.public_notif_section), - stringRes(R.string.public_notif_section_explainer), + R.string.public_notif_section, + R.string.public_notif_section_explainer, SettingsCategorySpacingModifier, ) } @@ -233,8 +233,8 @@ fun MappedAllRelayListView( item { SettingsCategoryWithButton( - stringRes(R.string.private_inbox_section), - stringRes(R.string.private_inbox_section_explainer), + R.string.private_inbox_section, + R.string.private_inbox_section_explainer, SettingsCategorySpacingModifier, action = { ResetDMRelays(dmViewModel) @@ -245,8 +245,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.private_outbox_section), - stringRes(R.string.private_outbox_section_explainer), + R.string.private_outbox_section, + R.string.private_outbox_section_explainer, SettingsCategorySpacingModifier, ) } @@ -254,8 +254,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.proxy_section), - stringRes(R.string.proxy_section_explainer), + R.string.proxy_section, + R.string.proxy_section_explainer, SettingsCategorySpacingModifier, ) } @@ -263,8 +263,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.broadcast_section), - stringRes(R.string.broadcast_section_explainer), + R.string.broadcast_section, + R.string.broadcast_section_explainer, SettingsCategorySpacingModifier, ) } @@ -272,8 +272,8 @@ fun MappedAllRelayListView( item { SettingsCategoryWithButton( - stringRes(R.string.indexer_section), - stringRes(R.string.indexer_section_explainer), + R.string.indexer_section, + R.string.indexer_section_explainer, SettingsCategorySpacingModifier, ) { ResetIndexerRelays(indexerViewModel) @@ -283,8 +283,8 @@ fun MappedAllRelayListView( item { SettingsCategoryWithButton( - stringRes(R.string.search_section), - stringRes(R.string.search_section_explainer), + R.string.search_section, + R.string.search_section_explainer, SettingsCategorySpacingModifier, ) { ResetSearchRelays(searchViewModel) @@ -294,8 +294,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.local_section), - stringRes(R.string.local_section_explainer), + R.string.local_section, + R.string.local_section_explainer, SettingsCategorySpacingModifier, ) } @@ -303,8 +303,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.trusted_section), - stringRes(R.string.trusted_section_explainer), + R.string.trusted_section, + R.string.trusted_section_explainer, SettingsCategorySpacingModifier, ) } @@ -312,8 +312,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.blocked_section), - stringRes(R.string.blocked_section_explainer), + R.string.blocked_section, + R.string.blocked_section_explainer, SettingsCategorySpacingModifier, ) } @@ -321,8 +321,8 @@ fun MappedAllRelayListView( item { SettingsCategory( - stringRes(R.string.connected_section), - stringRes(R.string.connected_section_description), + R.string.connected_section, + R.string.connected_section_description, SettingsCategorySpacingModifier, ) } @@ -382,19 +382,19 @@ fun ResetDMRelays(postViewModel: DMRelayListViewModel) { @Composable fun SettingsCategory( - title: String, - description: String? = null, + title: Int, + description: Int? = null, modifier: Modifier, ) { Column(modifier) { Text( - text = title, + text = stringRes(title), color = MaterialTheme.colorScheme.primary, style = MaterialTheme.typography.titleSmall, ) if (description != null) { Text( - description, + text = stringRes(description), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.grayText, ) @@ -404,21 +404,21 @@ fun SettingsCategory( @Composable fun SettingsCategoryWithButton( - title: String, - description: String? = null, + title: Int, + description: Int? = null, modifier: Modifier, action: @Composable () -> Unit, ) { Row(modifier, horizontalArrangement = RowColSpacing) { Column(modifier = Modifier.weight(1f)) { Text( - text = title, + text = stringRes(title), color = MaterialTheme.colorScheme.primary, style = MaterialTheme.typography.titleSmall, ) if (description != null) { Text( - text = description, + text = stringRes(description), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.grayText, )