From 82ffb68f29cf58c648aaa6c9ea8eeddedde9ecbe Mon Sep 17 00:00:00 2001 From: Konstantin Tskhovrebov Date: Wed, 5 Feb 2025 22:21:43 +0100 Subject: [PATCH] Android string/drawable resources -> Compose Multiplatform resources --- app/build.gradle.kts | 1 + .../com/daniebeler/pfpixelix/MainActivity.kt | 13 +- .../pfpixelix/common/Destinations.kt | 54 +++-- .../GetFediSoftwareUseCase.android.kt | 41 ---- .../pfpixelix/ui/composables/CustomPost.kt | 6 +- .../pfpixelix/ui/composables/FollowButton.kt | 9 +- .../ui/composables/HomeComposable.kt | 32 +-- .../ui/composables/LoginComposable.kt | 21 +- .../pfpixelix/ui/composables/RowElement.kt | 17 +- .../pfpixelix/ui/composables/ToTopButton.kt | 6 +- .../collection/CollectionComposable.kt | 22 +- .../custom_account/CustomAccount.kt | 13 +- .../direct_messages/chat/ChatComposable.kt | 14 +- .../chat/ChatElementComposable.kt | 11 +- .../ConversationElementComposable.kt | 7 +- .../conversations/ConversationsComposable.kt | 30 +-- .../edit_post/EditPostComposable.kt | 31 +-- .../edit_profile/EditProfileComposable.kt | 22 +- .../composables/explore/ExploreComposable.kt | 18 +- .../explore/trending/TrendingComposable.kt | 23 +- .../TrendingAccountsComposable.kt | 7 +- .../TrendingHashtagElement.kt | 7 +- .../TrendingHashtagsComposable.kt | 7 +- .../trending_posts/TrendingPostsComposable.kt | 7 +- .../followers/FollowerElementComposable.kt | 7 +- .../followers/FollowersComposable.kt | 9 +- .../followers/FollowersMainComposable.kt | 16 +- .../followers/FollowingComposable.kt | 11 +- .../composables/mention/MentionComposable.kt | 12 +- .../composables/newpost/NewPostComposable.kt | 42 ++-- .../notifications/CustomNotification.kt | 19 +- .../notifications/NotificationsComposable.kt | 32 +-- .../composables/post/CommentsBottomSheet.kt | 23 +- .../ui/composables/post/LikesBottomSheet.kt | 11 +- .../ui/composables/post/PostComposable.kt | 50 ++-- .../ui/composables/post/ShareBottomSheet.kt | 48 ++-- .../profile/CollectionsComposable.kt | 16 +- .../profile/MutualFollowersComposable.kt | 19 +- .../composables/profile/ProfileTopSection.kt | 23 +- .../profile/SwitchViewComposable.kt | 16 +- .../other_profile/OtherProfileComposable.kt | 96 ++++---- .../own_profile/AccountSwitchBottomSheet.kt | 19 +- .../own_profile/ModalBottomSheetContent.kt | 39 ++-- .../own_profile/OwnProfileComposable.kt | 7 +- .../server_stats/ServerStatsComposable.kt | 31 +-- .../about_instance/AboutInstanceComposable.kt | 28 +-- .../about_pixelix/AboutPixelixComposable.kt | 32 +-- .../BlockedAccountsComposable.kt | 12 +- .../CustomBlockedAccountRow.kt | 11 +- .../BookmarkedPostsComposable.kt | 12 +- .../FollowedHashtagsComposable.kt | 12 +- .../icon_selection/IconSelectionComposable.kt | 18 +- .../icon_selection/IconSelectionViewModel.kt | 2 + .../liked_posts/LikedPostsComposable.kt | 12 +- .../muted_accounts/CustomMutedAccountRow.kt | 11 +- .../muted_accounts/MutedAccountsComposable.kt | 12 +- .../preferences/PreferencesComposable.kt | 11 +- .../preferences/basic/ExpandOptionsPref.kt | 3 +- .../preferences/basic/SettingsPref.kt | 24 +- .../settings/preferences/basic/SwitchPref.kt | 5 +- .../preferences/prefs/ClearCachePref.kt | 9 +- .../preferences/prefs/CustomizeAppIconPref.kt | 20 +- .../preferences/prefs/FocusModePref.kt | 9 +- .../prefs/HideAltTextButtonPref.kt | 9 +- .../prefs/HideSensitiveContentPref.kt | 9 +- .../settings/preferences/prefs/LogoutPref.kt | 17 +- .../preferences/prefs/MoreSettingsPref.kt | 11 +- .../preferences/prefs/RepostSettingsPref.kt | 11 +- .../settings/preferences/prefs/ThemePref.kt | 25 +- .../preferences/prefs/UseInAppBrowserPref.kt | 9 +- .../single_post/SinglePostComposable.kt | 12 +- .../composables/states/EndOfListComposable.kt | 7 +- .../TextFieldLocationsComposable.kt | 5 +- .../TextFieldMentionsComposable.kt | 8 +- .../HashtagTimelineComposable.kt | 7 +- .../home_timeline/HomeTimelineComposable.kt | 11 +- .../widget/latest_image/LatestImageWidget.kt | 2 + .../notifications/NotificationsWidget.kt | 17 +- app/src/androidMain/res/drawable/hash.xml | 5 - app/src/androidMain/res/values/strings.xml | 219 +---------------- .../composeResources}/drawable/add_circle.xml | 2 +- .../drawable/add_circle_outline.xml | 4 +- .../drawable/add_outline.xml | 2 +- .../composeResources}/drawable/bookmark.xml | 2 +- .../drawable/bookmark_outline.xml | 2 +- .../drawable/bookmarks_outline.xml | 4 +- .../drawable/browsers_outline.xml | 4 +- .../drawable/chatbubble_outline.xml | 2 +- .../drawable/chevron_back_outline.xml | 2 +- .../drawable/chevron_forward_outline.xml | 2 +- .../drawable/chevron_up_outline.xml | 2 +- .../drawable/close_outline.xml | 2 +- .../drawable/cloud_download_outline.xml | 2 +- .../drawable/code_slash_outline.xml | 2 +- .../drawable/color_palette_outline.xml | 12 +- .../drawable/default_avatar.png | Bin 0 -> 14936 bytes .../drawable/document_text_outline.xml | 4 +- .../drawable/ellipsis_vertical.xml | 6 +- .../drawable/extension_puzzle_outline.xml | 2 +- .../drawable/eye_off_outline.xml | 4 +- .../drawable/eye_outline.xml | 4 +- .../drawable/fediverse_logo.png | Bin .../drawable/full_character.png | Bin .../composeResources}/drawable/grid.xml | 2 +- .../drawable/grid_outline.xml | 8 +- .../composeResources/drawable/hash.xml | 5 + .../composeResources}/drawable/heart.xml | 2 +- .../drawable/heart_outline.xml | 2 +- .../drawable/help_circle_outline.xml | 6 +- .../drawable/help_outline.xml | 4 +- .../composeResources}/drawable/house.xml | 2 +- .../composeResources}/drawable/house_fill.xml | 2 +- .../composeResources}/drawable/lemmy_logo.png | Bin .../drawable/list_outline.xml | 8 +- .../drawable/log_out_outline.xml | 2 +- .../drawable/login_wave_dark.png | Bin .../drawable/login_wave_light.png | Bin .../drawable/mail_outline.xml | 4 +- .../drawable/mastodon_logo.png | Bin .../drawable/misskey_logo.png | Bin .../drawable/notifications.xml | 2 +- .../drawable/notifications_outline.xml | 2 +- .../drawable/open_outline.xml | 2 +- .../drawable/paper_plane_right.xml | 2 +- .../drawable/peertube_logo.png | Bin .../drawable/pencil_outline.xml | 2 +- .../drawable/pixelfed_logo.png | Bin .../drawable/pixelix_logo.png | Bin .../drawable/pixelix_logo_black_xxl.png | Bin .../drawable/pixelix_logo_old.png | Bin .../drawable/pixelix_logo_white_xxl.png | Bin .../drawable/planet_outline.xml | 4 +- .../drawable/refresh_icon.xml | 9 + .../drawable/remove_circle_outline.xml | 4 +- .../drawable/reorder_four.xml | 2 +- .../drawable/reorder_four_outline.xml | 2 +- .../drawable/save_outline.xml | 2 +- .../composeResources}/drawable/search.xml | 2 +- .../drawable/search_outline.xml | 4 +- .../drawable/settings_outline.xml | 2 +- .../drawable/share_social_outline.xml | 8 +- .../drawable/shield_outline.xml | 2 +- .../drawable/square_outline.xml | 2 +- .../composeResources}/drawable/stack.xml | 4 +- .../drawable/star_outline.xml | 2 +- .../drawable/sync_outline.xml | 4 +- .../drawable/threads_logo.png | Bin .../drawable/trash_outline.xml | 6 +- .../values-af-rZA/strings.xml | 0 .../values-ar-rSA/strings.xml | 0 .../values-ca-rES/strings.xml | 0 .../values-cs-rCZ/strings.xml | 0 .../values-da-rDK/strings.xml | 0 .../values-de-rDE/strings.xml | 0 .../composeResources}/values-de/strings.xml | 0 .../values-el-rGR/strings.xml | 0 .../values-en-rUS/strings.xml | 0 .../values-eo-rUY/strings.xml | 0 .../values-es-rES/strings.xml | 0 .../values-fi-rFI/strings.xml | 0 .../values-fr-rFR/strings.xml | 0 .../values-gl-rES/strings.xml | 0 .../values-hu-rHU/strings.xml | 0 .../values-io-rEN/strings.xml | 0 .../values-it-rIT/strings.xml | 0 .../values-iw-rIL/strings.xml | 0 .../values-ja-rJP/strings.xml | 0 .../values-ko-rKR/strings.xml | 0 .../values-nl-rNL/strings.xml | 0 .../values-no-rNO/strings.xml | 0 .../values-pl-rPL/strings.xml | 0 .../values-pt-rBR/strings.xml | 0 .../values-pt-rPT/strings.xml | 0 .../values-ro-rRO/strings.xml | 0 .../values-ru-rRU/strings.xml | 0 .../values-sr-rSP/strings.xml | 0 .../values-sv-rSE/strings.xml | 0 .../values-tlh-rAA/strings.xml | 0 .../values-tr-rTR/strings.xml | 0 .../values-uk-rUA/strings.xml | 0 .../values-vi-rVN/strings.xml | 0 .../values-zh-rCN/strings.xml | 0 .../values-zh-rTW/strings.xml | 0 .../composeResources/values/strings.xml | 220 ++++++++++++++++++ .../domain/model/nodeinfo/FediSoftware.kt | 4 +- .../nodeinfo/GetFediSoftwareUseCase.kt | 35 ++- .../nodeinfo/GetFediSoftwareUseCase.ios.kt | 14 -- 187 files changed, 1083 insertions(+), 964 deletions(-) delete mode 100644 app/src/androidMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.android.kt delete mode 100644 app/src/androidMain/res/drawable/hash.xml rename app/src/{androidMain/res => commonMain/composeResources}/drawable/add_circle.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/add_circle_outline.xml (84%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/add_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/bookmark.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/bookmark_outline.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/bookmarks_outline.xml (85%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/browsers_outline.xml (85%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/chatbubble_outline.xml (93%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/chevron_back_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/chevron_forward_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/chevron_up_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/close_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/cloud_download_outline.xml (91%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/code_slash_outline.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/color_palette_outline.xml (77%) create mode 100644 app/src/commonMain/composeResources/drawable/default_avatar.png rename app/src/{androidMain/res => commonMain/composeResources}/drawable/document_text_outline.xml (87%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/ellipsis_vertical.xml (74%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/extension_puzzle_outline.xml (94%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/eye_off_outline.xml (93%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/eye_outline.xml (87%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/fediverse_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/full_character.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/grid.xml (92%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/grid_outline.xml (86%) create mode 100644 app/src/commonMain/composeResources/drawable/hash.xml rename app/src/{androidMain/res => commonMain/composeResources}/drawable/heart.xml (91%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/heart_outline.xml (91%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/help_circle_outline.xml (82%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/help_outline.xml (85%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/house.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/house_fill.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/lemmy_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/list_outline.xml (85%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/log_out_outline.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/login_wave_dark.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/login_wave_light.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/mail_outline.xml (86%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/mastodon_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/misskey_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/notifications.xml (94%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/notifications_outline.xml (93%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/open_outline.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/paper_plane_right.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/peertube_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pencil_outline.xml (91%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pixelfed_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pixelix_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pixelix_logo_black_xxl.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pixelix_logo_old.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/pixelix_logo_white_xxl.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/planet_outline.xml (84%) create mode 100644 app/src/commonMain/composeResources/drawable/refresh_icon.xml rename app/src/{androidMain/res => commonMain/composeResources}/drawable/remove_circle_outline.xml (84%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/reorder_four.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/reorder_four_outline.xml (89%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/save_outline.xml (93%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/search.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/search_outline.xml (83%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/settings_outline.xml (96%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/share_social_outline.xml (84%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/shield_outline.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/square_outline.xml (90%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/stack.xml (82%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/star_outline.xml (88%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/sync_outline.xml (87%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/threads_logo.png (100%) rename app/src/{androidMain/res => commonMain/composeResources}/drawable/trash_outline.xml (85%) rename app/src/{androidMain/res => commonMain/composeResources}/values-af-rZA/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ar-rSA/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ca-rES/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-cs-rCZ/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-da-rDK/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-de-rDE/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-de/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-el-rGR/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-en-rUS/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-eo-rUY/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-es-rES/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-fi-rFI/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-fr-rFR/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-gl-rES/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-hu-rHU/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-io-rEN/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-it-rIT/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-iw-rIL/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ja-rJP/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ko-rKR/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-nl-rNL/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-no-rNO/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-pl-rPL/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-pt-rBR/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-pt-rPT/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ro-rRO/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-ru-rRU/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-sr-rSP/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-sv-rSE/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-tlh-rAA/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-tr-rTR/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-uk-rUA/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-vi-rVN/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-zh-rCN/strings.xml (100%) rename app/src/{androidMain/res => commonMain/composeResources}/values-zh-rTW/strings.xml (100%) create mode 100644 app/src/commonMain/composeResources/values/strings.xml delete mode 100644 app/src/iosMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.ios.kt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c7dafaf5..1237f38f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -22,6 +22,7 @@ kotlin { implementation(compose.material) implementation(compose.material3) implementation(compose.materialIconsExtended) + implementation(compose.components.resources) implementation(libs.compose.ui.graphics) //logger diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/MainActivity.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/MainActivity.kt index 205aaadc..a02649dd 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/MainActivity.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/MainActivity.kt @@ -50,8 +50,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.dp @@ -107,6 +106,10 @@ import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.serialization.json.Json +import org.jetbrains.compose.resources.stringResource +import org.jetbrains.compose.resources.vectorResource +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.default_avatar import java.io.File import java.io.FileOutputStream import java.io.InputStream @@ -569,7 +572,7 @@ fun BottomBar( Row(verticalAlignment = Alignment.CenterVertically) { AsyncImage( model = avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(30.dp) @@ -583,13 +586,13 @@ fun BottomBar( } } else if (currentRoute?.startsWith(screen.route) == true) { Icon( - imageVector = ImageVector.vectorResource(screen.activeIcon), + imageVector = vectorResource(screen.activeIcon), modifier = Modifier.size(30.dp), contentDescription = stringResource(screen.label) ) } else { Icon( - imageVector = ImageVector.vectorResource(screen.icon), + imageVector = vectorResource(screen.icon), modifier = Modifier.size(30.dp), contentDescription = stringResource(screen.label) ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/common/Destinations.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/common/Destinations.kt index 2d57bcea..121b7dda 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/common/Destinations.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/common/Destinations.kt @@ -1,48 +1,58 @@ package com.daniebeler.pfpixelix.common -import androidx.annotation.DrawableRes -import androidx.annotation.StringRes -import com.daniebeler.pfpixelix.R +import org.jetbrains.compose.resources.DrawableResource +import org.jetbrains.compose.resources.StringResource +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.add_circle +import pixelix.app.generated.resources.add_circle_outline +import pixelix.app.generated.resources.alerts +import pixelix.app.generated.resources.bookmark_outline +import pixelix.app.generated.resources.home +import pixelix.app.generated.resources.house +import pixelix.app.generated.resources.house_fill +import pixelix.app.generated.resources.notifications +import pixelix.app.generated.resources.notifications_outline +import pixelix.app.generated.resources.profile +import pixelix.app.generated.resources.search +import pixelix.app.generated.resources.search_outline sealed class Destinations( val route: String, - @DrawableRes - val icon: Int = R.drawable.bookmark_outline, - @DrawableRes - val activeIcon: Int = R.drawable.bookmark_outline, - @StringRes val label: Int = R.string.home + val icon: DrawableResource = Res.drawable.bookmark_outline, + val activeIcon: DrawableResource = Res.drawable.bookmark_outline, + val label: StringResource = Res.string.home ) { data object HomeScreen : Destinations( route = "home_screen", - icon = R.drawable.house, - activeIcon = R.drawable.house_fill, - label = R.string.home + icon = Res.drawable.house, + activeIcon = Res.drawable.house_fill, + label = Res.string.home ) data object NotificationsScreen : Destinations( route = "notifications_screen", - icon = R.drawable.notifications_outline, - activeIcon = R.drawable.notifications, - label = R.string.alerts + icon = Res.drawable.notifications_outline, + activeIcon = Res.drawable.notifications, + label = Res.string.alerts ) data object OwnProfile : Destinations( route = "own_profile_screen", - icon = R.drawable.bookmark_outline, - activeIcon = R.drawable.bookmark_outline, - label = R.string.profile + icon = Res.drawable.bookmark_outline, + activeIcon = Res.drawable.bookmark_outline, + label = Res.string.profile ) data object NewPost : Destinations( - route = "new_post_screen", icon = R.drawable.add_circle_outline, - activeIcon = R.drawable.add_circle + route = "new_post_screen", icon = Res.drawable.add_circle_outline, + activeIcon = Res.drawable.add_circle ) data object Search : Destinations( route = "search_screen", - icon = R.drawable.search_outline, - activeIcon = R.drawable.search, - label = R.string.search + icon = Res.drawable.search_outline, + activeIcon = Res.drawable.search, + label = Res.string.search ) data object Profile : Destinations( diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.android.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.android.kt deleted file mode 100644 index 7f42790b..00000000 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.android.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.daniebeler.pfpixelix.domain.usecase.nodeinfo - -import com.daniebeler.pfpixelix.R -import com.daniebeler.pfpixelix.common.Resource -import com.daniebeler.pfpixelix.domain.model.nodeinfo.FediSoftware -import com.daniebeler.pfpixelix.domain.repository.CountryRepository -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.flow -import me.tatarka.inject.annotations.Inject - -@Inject -actual class GetFediSoftwareUseCase actual constructor( - private val countryRepository: CountryRepository -) { - actual operator fun invoke(domain: String): Flow> = flow { - emit(Resource.Loading()) - countryRepository.getSoftwareFromFediDB(domain).collect { res -> - if (res is Resource.Error) { - println("fief fief") - emit(Resource.Error(res.message!!)) - } - if (res is Resource.Success) { - println("fief") - if (res.data?.slug == "pixelfed") { - res.data.icon = R.drawable.pixelfed_logo - } else if (res.data?.slug == "mastodon") { - res.data.icon = R.drawable.mastodon_logo - } else if (res.data?.slug == "peertube") { - res.data.icon = R.drawable.peertube_logo - } else if (res.data?.slug == "lemmy") { - res.data.icon = R.drawable.lemmy_logo - } else if (res.data?.slug == "misskey") { - res.data.icon = R.drawable.misskey_logo - } else { - res.data!!.icon = R.drawable.fediverse_logo - } - emit(res) - } - } - } -} \ No newline at end of file diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/CustomPost.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/CustomPost.kt index 2c2024b7..8780b4bb 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/CustomPost.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/CustomPost.kt @@ -27,10 +27,12 @@ import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Post import com.daniebeler.pfpixelix.utils.BlurHashDecoder import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @Composable fun CustomPost( @@ -125,7 +127,7 @@ fun CustomPost( .align(Alignment.TopEnd) ) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.stack), + imageVector = vectorResource(Res.drawable.stack), tint = Color.White, contentDescription = null, ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/FollowButton.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/FollowButton.kt index 48114c61..1dd8b178 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/FollowButton.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/FollowButton.kt @@ -17,9 +17,10 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* @Composable fun FollowButton( @@ -159,13 +160,13 @@ private fun TextFollowButton( contentColor = MaterialTheme.colorScheme.onSecondaryContainer ) ) { - Text(text = stringResource(R.string.unfollow)) + Text(text = stringResource(Res.string.unfollow)) } } else { Button(onClick = { onFollowClick() }, modifier = Modifier.width(120.dp)) { - Text(text = stringResource(R.string.follow)) + Text(text = stringResource(Res.string.follow)) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/HomeComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/HomeComposable.kt index 7141736d..efbc7f83 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/HomeComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/HomeComposable.kt @@ -35,18 +35,20 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.timelines.global_timeline.GlobalTimelineComposable import com.daniebeler.pfpixelix.ui.composables.timelines.home_timeline.HomeTimelineComposable import com.daniebeler.pfpixelix.ui.composables.timelines.local_timeline.LocalTimelineComposable import com.daniebeler.pfpixelix.utils.Navigate import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -61,11 +63,11 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(id = R.string.app_name), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.app_name), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { showBottomSheet = true }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.help_outline), + imageVector = vectorResource(Res.drawable.help_outline), contentDescription = "Help" ) } @@ -79,7 +81,7 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un ) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.mail_outline), + imageVector = vectorResource(Res.drawable.mail_outline), contentDescription = "Conversations" ) } @@ -87,7 +89,7 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un openPreferencesDrawer() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.settings_outline), + imageVector = vectorResource(Res.drawable.settings_outline), contentDescription = "Settings" ) } @@ -102,7 +104,7 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un ) { PrimaryTabRow(selectedTabIndex = pagerState.currentPage) { - Tab(text = { Text(stringResource(R.string.home)) }, + Tab(text = { Text(stringResource(Res.string.home)) }, selected = pagerState.currentPage == 0, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -112,7 +114,7 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un } }) - Tab(text = { Text(stringResource(R.string.local)) }, + Tab(text = { Text(stringResource(Res.string.local)) }, selected = pagerState.currentPage == 1, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -122,7 +124,7 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un } }) - Tab(text = { Text(stringResource(R.string.global)) }, + Tab(text = { Text(stringResource(Res.string.global)) }, selected = pagerState.currentPage == 2, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -171,18 +173,18 @@ fun HomeComposable(navController: NavController, openPreferencesDrawer: () -> Un Spacer(modifier = Modifier.height(18.dp)) SheetItem( - header = stringResource(id = R.string.home), - description = stringResource(R.string.home_timeline_explained) + header = stringResource(Res.string.home), + description = stringResource(Res.string.home_timeline_explained) ) SheetItem( - header = stringResource(id = R.string.local), - description = stringResource(R.string.local_timeline_explained) + header = stringResource(Res.string.local), + description = stringResource(Res.string.local_timeline_explained) ) SheetItem( - header = stringResource(id = R.string.global), - description = stringResource(R.string.global_timeline_explained) + header = stringResource(Res.string.global), + description = stringResource(Res.string.global_timeline_explained) ) } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/LoginComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/LoginComposable.kt index 8129b019..6f1d4245 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/LoginComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/LoginComposable.kt @@ -44,8 +44,8 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.style.TextAlign @@ -53,7 +53,8 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.imeAwareInsets import com.google.accompanist.systemuicontroller.rememberSystemUiController @@ -104,9 +105,9 @@ fun LoginComposable( Image( painterResource( if (isSystemInDarkTheme()) { - R.drawable.pixelix_logo_black_xxl + Res.drawable.pixelix_logo_black_xxl } else { - R.drawable.pixelix_logo_white_xxl + Res.drawable.pixelix_logo_white_xxl } ), contentDescription = null, Modifier @@ -132,10 +133,10 @@ fun LoginComposable( Image( painterResource( - id = if (isSystemInDarkTheme()) { - R.drawable.login_wave_light + if (isSystemInDarkTheme()) { + Res.drawable.login_wave_light } else { - R.drawable.login_wave_dark + Res.drawable.login_wave_dark } ), contentDescription = null, @@ -158,7 +159,7 @@ fun LoginComposable( Row { Spacer(Modifier.width(6.dp)) Text( - text = stringResource(R.string.server_url), fontWeight = FontWeight.Bold + text = stringResource(Res.string.server_url), fontWeight = FontWeight.Bold ) } @@ -247,7 +248,7 @@ fun LoginComposable( Navigate.openUrlInApp(context, url) }) { Text( - stringResource(id = R.string.i_don_t_have_an_account), + stringResource(Res.string.i_don_t_have_an_account), textDecoration = TextDecoration.Underline, textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth() diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/RowElement.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/RowElement.kt index d9736511..f13cce59 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/RowElement.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/RowElement.kt @@ -23,16 +23,17 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.painterResource +import org.jetbrains.compose.resources.painterResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import org.jetbrains.compose.resources.DrawableResource +import org.jetbrains.compose.resources.vectorResource @Composable fun ButtonRowElement( - @DrawableRes - icon: Int, + icon: DrawableResource, text: String, smallText: String = "", onClick: () -> Unit, @@ -45,7 +46,7 @@ fun ButtonRowElement( onClick() }) { Icon( - imageVector = ImageVector.vectorResource(icon), + imageVector = vectorResource(icon), contentDescription = "", Modifier.padding(start = 18.dp, top = 12.dp, bottom = 12.dp), tint = color @@ -64,7 +65,7 @@ fun ButtonRowElement( @Composable fun ButtonRowElementWithRoundedImage( - @DrawableRes icon: Int, + icon: DrawableResource, text: String, smallText: String = "", onClick: () -> Unit, @@ -77,7 +78,7 @@ fun ButtonRowElementWithRoundedImage( onClick() }) { Image( - painter = painterResource(id = icon), + painter = painterResource(icon), contentDescription = "", Modifier .padding(start = 18.dp, top = 12.dp, bottom = 12.dp) @@ -137,7 +138,7 @@ fun ButtonRowElement( } @Composable fun SwitchRowItem( - @DrawableRes icon: Int, + icon: DrawableResource, text: String, smallText: String = "", isChecked: Boolean, @@ -154,7 +155,7 @@ fun SwitchRowItem( modifier = Modifier.weight(1f), verticalAlignment = Alignment.CenterVertically ) { - Icon(imageVector = ImageVector.vectorResource(icon), contentDescription = null) + Icon(imageVector = vectorResource(icon), contentDescription = null) Spacer(modifier = Modifier.width(12.dp)) Column( modifier = Modifier.weight(1f), diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/ToTopButton.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/ToTopButton.kt index c9aec59c..d56d3e9d 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/ToTopButton.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/ToTopButton.kt @@ -20,8 +20,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.vectorResource @Composable fun ToTopButton(listState: LazyListState, refresh: () -> Unit) { @@ -43,7 +45,7 @@ fun ToTopButton(listState: LazyListState, refresh: () -> Unit) { } }, containerColor = MaterialTheme.colorScheme.surfaceContainer) { - Icon(ImageVector.vectorResource(R.drawable.chevron_up_outline), contentDescription = "") + Icon(vectorResource(Res.drawable.chevron_up_outline), contentDescription = "") } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/collection/CollectionComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/collection/CollectionComposable.kt index c65d6dfc..34e6d97a 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/collection/CollectionComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/collection/CollectionComposable.kt @@ -42,18 +42,20 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.ButtonRowElement import com.daniebeler.pfpixelix.ui.composables.InfinitePostsGrid import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.utils.Share +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -98,7 +100,7 @@ fun CollectionComposable( ) Text( stringResource( - R.string.by, viewModel.collectionState.collection!!.username + Res.string.by, viewModel.collectionState.collection!!.username ), fontSize = 12.sp, lineHeight = 6.sp ) } @@ -109,7 +111,7 @@ fun CollectionComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }, actions = { @@ -117,12 +119,12 @@ fun CollectionComposable( TextButton(onClick = { viewModel.toggleEditMode() }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } TextButton(onClick = { viewModel.confirmEdit() }) { - Text(stringResource(id = R.string.confirm)) + Text(stringResource(Res.string.confirm)) } } else { @@ -199,8 +201,8 @@ fun CollectionComposable( modifier = Modifier.padding(bottom = 32.dp) ) { - ButtonRowElement(icon = R.drawable.open_outline, text = stringResource( - R.string.open_in_browser + ButtonRowElement(icon = Res.drawable.open_outline, text = stringResource( + Res.string.open_in_browser ), onClick = { if (viewModel.collectionState.collection != null) { viewModel.openUrl( @@ -209,8 +211,8 @@ fun CollectionComposable( } }) - ButtonRowElement(icon = R.drawable.share_social_outline, - text = stringResource(R.string.share_this_collection), + ButtonRowElement(icon = Res.drawable.share_social_outline, + text = stringResource(Res.string.share_this_collection), onClick = { if (viewModel.collectionState.collection != null) { Share.shareText(context, viewModel.collectionState.collection!!.url) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/custom_account/CustomAccount.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/custom_account/CustomAccount.kt index dc6c5849..4cb90b6b 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/custom_account/CustomAccount.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/custom_account/CustomAccount.kt @@ -20,15 +20,16 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.domain.model.Relationship import com.daniebeler.pfpixelix.ui.composables.FollowButton @@ -120,7 +121,7 @@ private fun CustomAccountPrivate( verticalAlignment = Alignment.CenterVertically) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) @@ -142,7 +143,7 @@ private fun CustomAccountPrivate( Text( text = " • " + String.format( Locale.GERMANY, "%,d", account.followersCount - ) + " " + stringResource(id = R.string.followers), + ) + " " + stringResource(Res.string.followers), fontSize = 12.sp, color = MaterialTheme.colorScheme.primary, lineHeight = 8.sp @@ -225,7 +226,7 @@ private fun CustomAccountPrivateNotClickable( Text( text = " • " + String.format( Locale.GERMANY, "%,d", account.followersCount - ) + " " + stringResource(id = R.string.followers), + ) + " " + stringResource(Res.string.followers), fontSize = 12.sp, color = MaterialTheme.colorScheme.primary, lineHeight = 8.sp diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatComposable.kt index a71f814f..39645220 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatComposable.kt @@ -46,8 +46,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.style.TextAlign @@ -56,12 +56,14 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.states.EndOfListComposable import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.imeAwareInsets +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @@ -87,7 +89,7 @@ fun ChatComposable( ) { AsyncImage( model = viewModel.chatState.chat!!.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) @@ -115,7 +117,7 @@ fun ChatComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -178,7 +180,7 @@ fun ChatComposable( .padding(8.dp) ) { Text( - text = stringResource(R.string.beginning_of_chat_note), + text = stringResource(Res.string.beginning_of_chat_note), textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth() ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatElementComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatElementComposable.kt index a7264cc2..f05711c7 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatElementComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/chat/ChatElementComposable.kt @@ -24,11 +24,12 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Message @Composable @@ -105,20 +106,20 @@ fun ConversationElementComposable( }, title = { Text(text = "Delete message") }, text = { - Text(text = stringResource(R.string.this_action_cannot_be_undone)) + Text(text = stringResource(Res.string.this_action_cannot_be_undone)) }, onDismissRequest = { showDeleteReplyDialog.value = false }, confirmButton = { TextButton(onClick = { deleteMessage() }) { - Text(stringResource(R.string.delete), color = MaterialTheme.colorScheme.error) + Text(stringResource(Res.string.delete), color = MaterialTheme.colorScheme.error) } }, dismissButton = { TextButton(onClick = { showDeleteReplyDialog.value = false }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationElementComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationElementComposable.kt index 4306d834..349c3fc4 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationElementComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationElementComposable.kt @@ -15,13 +15,14 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource +import org.jetbrains.compose.resources.painterResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Conversation import com.daniebeler.pfpixelix.utils.Navigate @@ -38,7 +39,7 @@ fun ConversationElementComposable(conversation: Conversation, navController: Nav verticalAlignment = Alignment.CenterVertically) { AsyncImage( model = conversation.accounts.first().avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationsComposable.kt index c828dbc2..4f629016 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/direct_messages/conversations/ConversationsComposable.kt @@ -44,7 +44,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.TextRange import androidx.compose.ui.text.font.FontWeight @@ -52,7 +52,8 @@ import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.SheetItem import com.daniebeler.pfpixelix.ui.composables.states.EmptyState @@ -61,6 +62,7 @@ import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.LoadingComposable import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -79,25 +81,25 @@ fun ConversationsComposable( FloatingActionButton(onClick = { showNewChatDialog.value = true }) { - Icon(ImageVector.vectorResource(R.drawable.add_outline), contentDescription = "Add") + Icon(vectorResource(Res.drawable.add_outline), contentDescription = "Add") } }, topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(R.string.conversations), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.conversations), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }, actions = { IconButton(onClick = { showBottomSheet = true }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.help_outline), + imageVector = vectorResource(Res.drawable.help_outline), tint = MaterialTheme.colorScheme.error, contentDescription = null ) @@ -143,8 +145,8 @@ fun ConversationsComposable( if (!viewModel.conversationsState.isLoading && viewModel.conversationsState.error.isEmpty() && viewModel.conversationsState.conversations.isEmpty()) { FullscreenEmptyStateComposable( EmptyState( - icon = ImageVector.vectorResource(R.drawable.mail_outline), heading = stringResource( - R.string.you_don_t_have_any_notifications + icon = vectorResource(Res.drawable.mail_outline), heading = stringResource( + Res.string.you_don_t_have_any_notifications ) ) ) @@ -177,8 +179,8 @@ fun ConversationsComposable( Spacer(modifier = Modifier.height(18.dp)) SheetItem( - header = stringResource(R.string.warning), - description = stringResource(R.string.direct_messages_encryption_description) + header = stringResource(Res.string.warning), + description = stringResource(Res.string.direct_messages_encryption_description) ) Spacer(modifier = Modifier.height(18.dp)) @@ -205,7 +207,7 @@ private fun CreateNewConversation( ) { AlertDialog(title = { - Text(text = stringResource(R.string.new_direct_message)) + Text(text = stringResource(Res.string.new_direct_message)) }, text = { Column { OutlinedTextField( @@ -213,7 +215,7 @@ private fun CreateNewConversation( onValueChange = { viewModel.changeNewConversationUsername(it) }, - label = { Text(stringResource(R.string.select_recipient)) }, + label = { Text(stringResource(Res.string.select_recipient)) }, shape = RoundedCornerShape(12.dp), ) if (viewModel.newConversationState.suggestions.isNotEmpty()) { @@ -258,13 +260,13 @@ private fun CreateNewConversation( close() } }) { - Text(stringResource(R.string.confirm)) + Text(stringResource(Res.string.confirm)) } }, dismissButton = { TextButton(onClick = { close() }) { - Text(stringResource(R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_post/EditPostComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_post/EditPostComposable.kt index 73a19a16..441bc5f1 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_post/EditPostComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_post/EditPostComposable.kt @@ -54,7 +54,7 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.unit.dp @@ -62,7 +62,8 @@ import androidx.navigation.NavController import coil3.compose.AsyncImage import coil3.request.ImageRequest import coil3.video.VideoFrameDecoder -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.di.injectViewModel import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.LoadingComposable @@ -95,7 +96,7 @@ fun EditPostComposable( TopAppBar(scrollBehavior = scrollBehavior, title = { Text( - text = stringResource(id = R.string.edit_post), fontWeight = FontWeight.Bold + text = stringResource(Res.string.edit_post), fontWeight = FontWeight.Bold ) }, navigationIcon = { @@ -128,14 +129,14 @@ fun EditPostComposable( onClick = { showSaveAlert = true }, modifier = Modifier.width(120.dp) ) { - Text(text = stringResource(R.string.save)) + Text(text = stringResource(Res.string.save)) } } } else { Button( onClick = { }, enabled = false, modifier = Modifier.width(120.dp) ) { - Text(text = stringResource(R.string.save)) + Text(text = stringResource(Res.string.save)) } } } @@ -199,7 +200,7 @@ fun EditPostComposable( }, modifier = Modifier.weight(1f), singleLine = false, - placeholder = { Text(stringResource(R.string.content_warning_or_spoiler_text)) }, + placeholder = { Text(stringResource(Res.string.content_warning_or_spoiler_text)) }, shape = RoundedCornerShape(16.dp), colors = TextFieldDefaults.colors( unfocusedIndicatorColor = Color.Transparent, @@ -243,7 +244,7 @@ fun EditPostComposable( TextFieldMentionsComposable(submit = {}, text = viewModel.caption, changeText = { text -> viewModel.caption = text }, - labelStringId = R.string.caption, + labelStringId = Res.string.caption, modifier = Modifier.fillMaxWidth(), imeAction = ImeAction.Default, suggestionsBoxColor = MaterialTheme.colorScheme.surfaceContainer, @@ -255,7 +256,7 @@ fun EditPostComposable( modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically ) { - Text(text = stringResource(R.string.sensitive_nsfw_media)) + Text(text = stringResource(Res.string.sensitive_nsfw_media)) Switch(checked = viewModel.sensitive, onCheckedChange = { viewModel.sensitive = it }) } @@ -264,7 +265,7 @@ fun EditPostComposable( value = viewModel.sensitiveText, singleLine = false, onValueChange = { viewModel.sensitiveText = it }, - placeholder = { Text(stringResource(R.string.content_warning_or_spoiler_text)) }, + placeholder = { Text(stringResource(Res.string.content_warning_or_spoiler_text)) }, modifier = Modifier.fillMaxWidth(), shape = RoundedCornerShape(16.dp), colors = TextFieldDefaults.colors( @@ -280,7 +281,7 @@ fun EditPostComposable( } TextFieldLocationsComposable(submit = {}, submitPlace = {viewModel._setLocation(it)}, initialValue = viewModel.editPostState.post!!.place, - labelStringId = R.string.location, + labelStringId = Res.string.location, modifier = Modifier.fillMaxWidth(), imeAction = ImeAction.Default, suggestionsBoxColor = MaterialTheme.colorScheme.surfaceContainer, @@ -295,21 +296,21 @@ fun EditPostComposable( if (showSaveAlert) { AlertDialog(title = { - Text(text = stringResource(R.string.sure_update_post)) + Text(text = stringResource(Res.string.sure_update_post)) }, onDismissRequest = { showSaveAlert = false }, dismissButton = { TextButton(onClick = { showSaveAlert = false }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }, confirmButton = { TextButton(onClick = { showSaveAlert = false viewModel.updatePost(postId, navController) }) { - Text(stringResource(id = R.string.save)) + Text(stringResource(Res.string.save)) } }) } @@ -329,13 +330,13 @@ fun EditPostComposable( TextButton(onClick = { viewModel.deleteMedia(viewModel.deleteMediaDialog!!) }) { - Text(stringResource(R.string.delete)) + Text(stringResource(Res.string.delete)) } }, dismissButton = { TextButton(onClick = { viewModel.deleteMediaDialog = null }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_profile/EditProfileComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_profile/EditProfileComposable.kt index 55b75287..11db0c03 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_profile/EditProfileComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/edit_profile/EditProfileComposable.kt @@ -46,7 +46,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -57,7 +57,9 @@ import com.canhub.cropper.CropImageContract import com.canhub.cropper.CropImageContractOptions import com.canhub.cropper.CropImageOptions import com.canhub.cropper.CropImageView -import com.daniebeler.pfpixelix.R +import org.jetbrains.compose.resources.vectorResource +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -104,14 +106,14 @@ fun EditProfileComposable( topBar = { CenterAlignedTopAppBar(scrollBehavior = scrollBehavior, title = { - Text(text = stringResource(R.string.edit_profile), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.edit_profile), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } @@ -134,7 +136,7 @@ fun EditProfileComposable( disabledContentColor = MaterialTheme.colorScheme.onSurface ) ) { - Text(text = stringResource(R.string.save)) + Text(text = stringResource(Res.string.save)) } } } else { @@ -157,7 +159,7 @@ fun EditProfileComposable( modifier = Modifier.width(120.dp), shape = RoundedCornerShape(12.dp) ) { - Text(text = stringResource(R.string.save)) + Text(text = stringResource(Res.string.save)) } } } @@ -197,7 +199,7 @@ fun EditProfileComposable( Row { Spacer(Modifier.width(6.dp)) Text( - text = stringResource(R.string.displayname), + text = stringResource(Res.string.displayname), fontWeight = FontWeight.Bold ) } @@ -222,7 +224,7 @@ fun EditProfileComposable( Row { Spacer(Modifier.width(6.dp)) - Text(text = stringResource(R.string.bio), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.bio), fontWeight = FontWeight.Bold) } Spacer(Modifier.height(6.dp)) @@ -245,7 +247,7 @@ fun EditProfileComposable( Row { Spacer(Modifier.width(6.dp)) - Text(text = stringResource(R.string.website), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.website), fontWeight = FontWeight.Bold) } Spacer(Modifier.height(6.dp)) @@ -272,7 +274,7 @@ fun EditProfileComposable( Row(verticalAlignment = Alignment.CenterVertically) { Spacer(Modifier.width(6.dp)) Text( - text = stringResource(R.string.private_profile), + text = stringResource(Res.string.private_profile), fontWeight = FontWeight.Bold ) Spacer(modifier = Modifier.weight(1f)) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/ExploreComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/ExploreComposable.kt index 3164d0d9..1873016b 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/ExploreComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/ExploreComposable.kt @@ -56,8 +56,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.semantics.isTraversalGroup import androidx.compose.ui.semantics.semantics @@ -66,7 +66,8 @@ import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.domain.model.SavedSearchItem import com.daniebeler.pfpixelix.domain.model.SavedSearchType @@ -77,6 +78,7 @@ import com.daniebeler.pfpixelix.ui.composables.states.FullscreenLoadingComposabl import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.imeAwareInsets import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -107,10 +109,10 @@ fun ExploreComposable( }, expanded = expanded, onExpandedChange = { expanded = it }, - placeholder = { Text(stringResource(R.string.explore)) }, + placeholder = { Text(stringResource(Res.string.explore)) }, leadingIcon = { if (!expanded) { - Icon(ImageVector.vectorResource(R.drawable.search_outline), contentDescription = null) + Icon(vectorResource(Res.drawable.search_outline), contentDescription = null) } else { Icon(Icons.Outlined.ArrowBackIosNew, contentDescription = null, @@ -218,7 +220,7 @@ private fun SearchResultComposable(searchState: SearchState, saveAccount: (Strin Column { PrimaryTabRow(selectedTabIndex = pagerState.currentPage) { - Tab(text = { Text(stringResource(id = R.string.accounts)) }, + Tab(text = { Text(stringResource(Res.string.accounts)) }, selected = pagerState.currentPage == 0, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -229,7 +231,7 @@ private fun SearchResultComposable(searchState: SearchState, saveAccount: (Strin }) - Tab(text = { Text(stringResource(R.string.hashtags)) }, + Tab(text = { Text(stringResource(Res.string.hashtags)) }, selected = pagerState.currentPage == 1, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -307,7 +309,7 @@ private fun PastSearchItem( if (item.savedSearchType == SavedSearchType.Account) { AsyncImage( model = item.account!!.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/TrendingComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/TrendingComposable.kt index 86290dbb..06af0fa0 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/TrendingComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/TrendingComposable.kt @@ -26,10 +26,11 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.SheetItem import com.daniebeler.pfpixelix.ui.composables.explore.trending.trending_accounts.TrendingAccountsComposable import com.daniebeler.pfpixelix.ui.composables.explore.trending.trending_hashtags.TrendingHashtagsComposable @@ -55,7 +56,7 @@ fun TrendingComposable(navController: NavController) { ) { PrimaryTabRow(selectedTabIndex = pagerState.currentPage) { - Tab(text = { Text(stringResource(id = R.string.posts)) }, + Tab(text = { Text(stringResource(Res.string.posts)) }, selected = pagerState.currentPage == 0, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -66,7 +67,7 @@ fun TrendingComposable(navController: NavController) { }) - Tab(text = { Text(stringResource(R.string.accounts)) }, + Tab(text = { Text(stringResource(Res.string.accounts)) }, selected = pagerState.currentPage == 1, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -76,7 +77,7 @@ fun TrendingComposable(navController: NavController) { } }) - Tab(text = { Text(stringResource(R.string.hashtags)) }, + Tab(text = { Text(stringResource(Res.string.hashtags)) }, selected = pagerState.currentPage == 2, selectedContentColor = MaterialTheme.colorScheme.primary, unselectedContentColor = MaterialTheme.colorScheme.onBackground, @@ -127,18 +128,18 @@ fun TrendingComposable(navController: NavController) { Spacer(modifier = Modifier.height(18.dp)) SheetItem( - header = stringResource(R.string.what_makes_a_post_trend), - description = stringResource(R.string.trending_post_description) + header = stringResource(Res.string.what_makes_a_post_trend), + description = stringResource(Res.string.trending_post_description) ) SheetItem( - header = stringResource(R.string.what_makes_an_account_trend), - description = stringResource(R.string.trending_account_description) + header = stringResource(Res.string.what_makes_an_account_trend), + description = stringResource(Res.string.trending_account_description) ) SheetItem( - header = stringResource(R.string.what_makes_a_hashtag_trend), - description = stringResource(R.string.trending_hashtag_description) + header = stringResource(Res.string.what_makes_a_hashtag_trend), + description = stringResource(Res.string.trending_hashtag_description) ) } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_accounts/TrendingAccountsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_accounts/TrendingAccountsComposable.kt index ec51ac42..fe65fae1 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_accounts/TrendingAccountsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_accounts/TrendingAccountsComposable.kt @@ -8,11 +8,12 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable @@ -51,7 +52,7 @@ fun TrendingAccountsComposable( } if (!viewModel.trendingAccountsState.isLoading && viewModel.trendingAccountsState.error.isEmpty()) { - FullscreenEmptyStateComposable(EmptyState(heading = stringResource(R.string.no_trending_profiles))) + FullscreenEmptyStateComposable(EmptyState(heading = stringResource(Res.string.no_trending_profiles))) } } } \ No newline at end of file diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagElement.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagElement.kt index cbbb0d8e..b9ce4f16 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagElement.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagElement.kt @@ -22,13 +22,14 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Tag import com.daniebeler.pfpixelix.ui.composables.CustomPost import com.daniebeler.pfpixelix.utils.Navigate @@ -66,7 +67,7 @@ fun TrendingHashtagElement( text = " • " + String.format( Locale.GERMANY, "%,d", viewModel.hashtagState.hashtag!!.count!! ) + " " + stringResource( - id = R.string.posts + Res.string.posts ), fontSize = 12.sp, color = MaterialTheme.colorScheme.secondary ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagsComposable.kt index 05e96f4e..a1191f65 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_hashtags/TrendingHashtagsComposable.kt @@ -8,10 +8,11 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable @@ -47,7 +48,7 @@ fun TrendingHashtagsComposable( } if (!viewModel.trendingHashtagsState.isLoading && viewModel.trendingHashtagsState.error.isEmpty()) { - FullscreenEmptyStateComposable(EmptyState(heading = stringResource(R.string.no_trending_hashtags))) + FullscreenEmptyStateComposable(EmptyState(heading = stringResource(Res.string.no_trending_hashtags))) } } }} \ No newline at end of file diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_posts/TrendingPostsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_posts/TrendingPostsComposable.kt index a040a29a..455fe97d 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_posts/TrendingPostsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/explore/trending/trending_posts/TrendingPostsComposable.kt @@ -5,10 +5,11 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfinitePostsGrid import com.daniebeler.pfpixelix.ui.composables.states.EmptyState @@ -30,7 +31,7 @@ fun TrendingPostsComposable( isRefreshing = viewModel.trendingState.isRefreshing, endReached = true, error = viewModel.trendingState.error, - emptyMessage = EmptyState(heading = stringResource(R.string.no_trending_posts)), + emptyMessage = EmptyState(heading = stringResource(Res.string.no_trending_posts)), navController = navController, onRefresh = { viewModel.getTrendingPosts(range, true) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowerElementComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowerElementComposable.kt index 2b05b5e2..2c1e10d3 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowerElementComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowerElementComposable.kt @@ -15,12 +15,13 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource +import org.jetbrains.compose.resources.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.utils.Navigate @@ -39,7 +40,7 @@ fun FollowerElementComposable( ) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersComposable.kt index 6125454b..47546e19 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersComposable.kt @@ -13,11 +13,12 @@ import androidx.compose.material3.CircularProgressIndicator import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.EndOfListComposable @@ -62,8 +63,8 @@ fun FollowersComposable( FullscreenEmptyStateComposable( emptyState = EmptyState( icon = Icons.Outlined.Groups, - heading = stringResource(R.string.empty), - message = stringResource(R.string.nobody_follows_you_yet) + heading = stringResource(Res.string.empty), + message = stringResource(Res.string.nobody_follows_you_yet) ) ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersMainComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersMainComposable.kt index 68a5f0df..155078f1 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersMainComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowersMainComposable.kt @@ -32,14 +32,16 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.input.nestedscroll.nestedScroll -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -84,7 +86,7 @@ fun FollowersMainComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -101,11 +103,11 @@ fun FollowersMainComposable( if (viewModel.accountState.account != null) { Text( viewModel.accountState.account?.followersCount.toString() + " " + stringResource( - id = R.string.followers + Res.string.followers ) ) } else { - Text(text = stringResource(id = R.string.followers)) + Text(text = stringResource(Res.string.followers)) } }, selected = pagerState.currentPage == 0, @@ -121,11 +123,11 @@ fun FollowersMainComposable( if (viewModel.accountState.account != null) { Text( viewModel.accountState.account?.followingCount.toString() + " " + stringResource( - id = R.string.following + Res.string.following ) ) } else { - Text(text = stringResource(id = R.string.following)) + Text(text = stringResource(Res.string.following)) } }, selected = pagerState.currentPage == 1, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowingComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowingComposable.kt index aba4c72c..508e366a 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowingComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/followers/FollowingComposable.kt @@ -13,11 +13,12 @@ import androidx.compose.material3.CircularProgressIndicator import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.EndOfListComposable @@ -62,9 +63,9 @@ fun FollowingComposable( if (!viewModel.followingState.isLoading && viewModel.followingState.error.isEmpty() && viewModel.followingState.following.isEmpty()) { FullscreenEmptyStateComposable( emptyState = EmptyState(icon = Icons.Outlined.Groups, - heading = stringResource(id = R.string.empty), - message = stringResource(R.string.the_profiles_you_follow_will_appear_here), - buttonText = stringResource(R.string.explore_trending_profiles), + heading = stringResource(Res.string.empty), + message = stringResource(Res.string.the_profiles_you_follow_will_appear_here), + buttonText = stringResource(Res.string.explore_trending_profiles), onClick = { Navigate.navigate("trending_screen/accounts", navController) }) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/mention/MentionComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/mention/MentionComposable.kt index bcc97ed3..1b602418 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/mention/MentionComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/mention/MentionComposable.kt @@ -36,20 +36,22 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.layout.Layout -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Post import com.daniebeler.pfpixelix.ui.composables.post.PostComposable import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.LoadingComposable import com.daniebeler.pfpixelix.utils.Navigate import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -78,11 +80,11 @@ fun MentionComposable( CenterAlignedTopAppBar(title = { Column(horizontalAlignment = Alignment.CenterHorizontally) { Text( - text = stringResource(id = R.string.post), fontWeight = FontWeight.Bold + text = stringResource(Res.string.post), fontWeight = FontWeight.Bold ) Text( text = stringResource( - id = R.string.by, (viewModel.postState.post?.account?.username ?: "") + Res.string.by, (viewModel.postState.post?.account?.username ?: "") ), fontSize = 12.sp, lineHeight = 6.sp ) } @@ -91,7 +93,7 @@ fun MentionComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/newpost/NewPostComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/newpost/NewPostComposable.kt index bdeb58da..7a53a2d1 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/newpost/NewPostComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/newpost/NewPostComposable.kt @@ -55,7 +55,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction @@ -64,7 +64,8 @@ import androidx.navigation.NavController import coil3.compose.AsyncImage import coil3.request.ImageRequest import coil3.video.VideoFrameDecoder -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.common.Constants.AUDIENCE_FOLLOWERS_ONLY import com.daniebeler.pfpixelix.common.Constants.AUDIENCE_PUBLIC import com.daniebeler.pfpixelix.common.Constants.AUDIENCE_UNLISTED @@ -76,6 +77,7 @@ import com.daniebeler.pfpixelix.ui.composables.textfield_mentions.TextFieldMenti import com.daniebeler.pfpixelix.utils.MimeType import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.imeAwareInsets +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class ) @@ -111,13 +113,13 @@ fun NewPostComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(text = stringResource(R.string.new_post), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.new_post), fontWeight = FontWeight.Bold) }, actions = { Button( onClick = { showReleaseAlert = true }, enabled = (viewModel.images.isNotEmpty() && !viewModel.mediaUploadState.isLoading) ) { - Text(text = stringResource(R.string.release)) + Text(text = stringResource(Res.string.release)) } }) }) { paddingValues -> @@ -175,7 +177,7 @@ fun NewPostComposable( focusedContainerColor = MaterialTheme.colorScheme.surfaceContainer, unfocusedContainerColor = MaterialTheme.colorScheme.surfaceContainer ), - label = { Text(stringResource(R.string.alt_text)) }, + label = { Text(stringResource(Res.string.alt_text)) }, ) if (viewModel.images.size > 1) { @@ -198,7 +200,7 @@ fun NewPostComposable( viewModel.deleteMedia(image.id, image.imageUri) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.trash_outline), + imageVector = vectorResource(Res.drawable.trash_outline), contentDescription = "delete Image", tint = MaterialTheme.colorScheme.error ) @@ -215,7 +217,7 @@ fun NewPostComposable( } .height(50.dp) .width(50.dp), - imageVector = ImageVector.vectorResource(R.drawable.add_outline), + imageVector = vectorResource(Res.drawable.add_outline), contentDescription = null, ) } @@ -224,7 +226,7 @@ fun NewPostComposable( submit = {}, text = viewModel.caption, changeText = { text -> viewModel.caption = text }, - labelStringId = R.string.caption, + labelStringId = Res.string.caption, modifier = Modifier.fillMaxWidth(), imeAction = ImeAction.Default, suggestionsBoxColor = MaterialTheme.colorScheme.surfaceContainer, @@ -235,7 +237,7 @@ fun NewPostComposable( modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically ) { - Text(text = stringResource(R.string.sensitive_nsfw_media)) + Text(text = stringResource(Res.string.sensitive_nsfw_media)) Switch(checked = viewModel.sensitive, onCheckedChange = { viewModel.sensitive = it }) } @@ -244,7 +246,7 @@ fun NewPostComposable( value = viewModel.sensitiveText, onValueChange = { viewModel.sensitiveText = it }, modifier = Modifier.fillMaxWidth(), - label = { Text(stringResource(R.string.content_warning_or_spoiler_text)) }, + label = { Text(stringResource(Res.string.content_warning_or_spoiler_text)) }, shape = RoundedCornerShape(16.dp), colors = TextFieldDefaults.colors( unfocusedIndicatorColor = Color.Transparent, @@ -259,20 +261,20 @@ fun NewPostComposable( modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically ) { - Text(text = stringResource(R.string.audience)) + Text(text = stringResource(Res.string.audience)) Box { OutlinedButton(onClick = { expanded = !expanded }) { val buttonText: String = when (viewModel.audience) { AUDIENCE_PUBLIC -> { - stringResource(id = R.string.audience_public) + stringResource(Res.string.audience_public) } AUDIENCE_UNLISTED -> { - stringResource(id = R.string.unlisted) + stringResource(Res.string.unlisted) } AUDIENCE_FOLLOWERS_ONLY -> { - stringResource(id = R.string.followers_only) + stringResource(Res.string.followers_only) } else -> { @@ -282,7 +284,7 @@ fun NewPostComposable( Text(text = buttonText) } DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) { - DropdownMenuItem(text = { Text(stringResource(R.string.audience_public)) }, + DropdownMenuItem(text = { Text(stringResource(Res.string.audience_public)) }, onClick = { viewModel.audience = AUDIENCE_PUBLIC }, trailingIcon = { if (viewModel.audience == AUDIENCE_PUBLIC) { @@ -293,7 +295,7 @@ fun NewPostComposable( ) } }) - DropdownMenuItem(text = { Text(stringResource(R.string.unlisted)) }, + DropdownMenuItem(text = { Text(stringResource(Res.string.unlisted)) }, onClick = { viewModel.audience = AUDIENCE_UNLISTED }, trailingIcon = { if (viewModel.audience == AUDIENCE_UNLISTED) { @@ -304,7 +306,7 @@ fun NewPostComposable( ) } }) - DropdownMenuItem(text = { Text(stringResource(R.string.followers_only)) }, + DropdownMenuItem(text = { Text(stringResource(Res.string.followers_only)) }, onClick = { viewModel.audience = AUDIENCE_FOLLOWERS_ONLY }, trailingIcon = { if (viewModel.audience == AUDIENCE_FOLLOWERS_ONLY) { @@ -325,7 +327,7 @@ fun NewPostComposable( submit = {viewModel.setLocation(it)}, submitPlace = {}, initialValue = null, - labelStringId = R.string.location, + labelStringId = Res.string.location, modifier = Modifier.fillMaxWidth(), imeAction = ImeAction.Default, suggestionsBoxColor = MaterialTheme.colorScheme.surfaceContainer, @@ -358,14 +360,14 @@ fun NewPostComposable( TextButton(onClick = { showReleaseAlert = false }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }, confirmButton = { TextButton(onClick = { showReleaseAlert = false viewModel.post(navController) }) { - Text(stringResource(id = R.string.release)) + Text(stringResource(Res.string.release)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/CustomNotification.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/CustomNotification.kt index ecdf84c8..fdd442a4 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/CustomNotification.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/CustomNotification.kt @@ -19,8 +19,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -28,7 +28,8 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Notification import com.daniebeler.pfpixelix.utils.Navigate @@ -42,25 +43,25 @@ fun CustomNotification( var text = "" when (notification.type) { "follow" -> { - text = " " + stringResource(R.string.followed_you) + text = " " + stringResource(Res.string.followed_you) } "mention" -> { - text = " " + stringResource(R.string.mentioned_you_in_a_post) + text = " " + stringResource(Res.string.mentioned_you_in_a_post) showImage = true } "direct" -> { - text = " " + stringResource(R.string.sent_a_dm) + text = " " + stringResource(Res.string.sent_a_dm) } "favourite" -> { - text = " " + stringResource(R.string.liked_your_post) + text = " " + stringResource(Res.string.liked_your_post) showImage = true } "reblog" -> { - text = " " + stringResource(R.string.reblogged_your_post) + text = " " + stringResource(Res.string.reblogged_your_post) showImage = true } } @@ -82,7 +83,7 @@ fun CustomNotification( verticalAlignment = Alignment.CenterVertically ) { AsyncImage(model = notification.account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/NotificationsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/NotificationsComposable.kt index befa2b0f..0276cde3 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/NotificationsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/notifications/NotificationsComposable.kt @@ -42,13 +42,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.EndOfListComposable @@ -56,6 +57,7 @@ import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.LoadingComposable import com.daniebeler.pfpixelix.widget.notifications.NotificationWidgetReceiver +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -70,12 +72,12 @@ fun NotificationsComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(R.string.notifications), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.notifications), fontWeight = FontWeight.Bold) }, actions = { IconButton(onClick = { pinWidget(context) }) { - Icon(imageVector = ImageVector.vectorResource(R.drawable.extension_puzzle_outline), contentDescription = "add widget") + Icon(imageVector = vectorResource(Res.drawable.extension_puzzle_outline), contentDescription = "add widget") } }) }) { paddingValues -> @@ -88,9 +90,9 @@ fun NotificationsComposable( Row(modifier = Modifier.horizontalScroll(scrollState)) { Spacer(modifier = Modifier.width(12.dp)) if (viewModel.filter == NotificationsFilterEnum.All) { - ActiveFilterButton(text = stringResource(R.string.all)) + ActiveFilterButton(text = stringResource(Res.string.all)) } else { - InactiveFilterButton(text = stringResource(R.string.all), onClick = { + InactiveFilterButton(text = stringResource(Res.string.all), onClick = { viewModel.changeFilter(NotificationsFilterEnum.All) }) } @@ -98,10 +100,10 @@ fun NotificationsComposable( Spacer(modifier = Modifier.width(12.dp)) if (viewModel.filter == NotificationsFilterEnum.Followers) { - ActiveFilterButton(text = stringResource(id = R.string.followers)) + ActiveFilterButton(text = stringResource(Res.string.followers)) } else { InactiveFilterButton( - text = stringResource(id = R.string.followers), + text = stringResource(Res.string.followers), onClick = { viewModel.changeFilter(NotificationsFilterEnum.Followers) }) @@ -110,9 +112,9 @@ fun NotificationsComposable( Spacer(modifier = Modifier.width(12.dp)) if (viewModel.filter == NotificationsFilterEnum.Likes) { - ActiveFilterButton(text = stringResource(R.string.likes_)) + ActiveFilterButton(text = stringResource(Res.string.likes_)) } else { - InactiveFilterButton(text = stringResource(R.string.likes_), onClick = { + InactiveFilterButton(text = stringResource(Res.string.likes_), onClick = { viewModel.changeFilter(NotificationsFilterEnum.Likes) }) } @@ -120,9 +122,9 @@ fun NotificationsComposable( Spacer(modifier = Modifier.width(12.dp)) if (viewModel.filter == NotificationsFilterEnum.Reposts) { - ActiveFilterButton(text = stringResource(R.string.reposts)) + ActiveFilterButton(text = stringResource(Res.string.reposts)) } else { - InactiveFilterButton(text = stringResource(R.string.reposts), onClick = { + InactiveFilterButton(text = stringResource(Res.string.reposts), onClick = { viewModel.changeFilter(NotificationsFilterEnum.Reposts) }) } @@ -130,9 +132,9 @@ fun NotificationsComposable( Spacer(modifier = Modifier.width(12.dp)) if (viewModel.filter == NotificationsFilterEnum.Mentions) { - ActiveFilterButton(text = stringResource(R.string.mentions)) + ActiveFilterButton(text = stringResource(Res.string.mentions)) } else { - InactiveFilterButton(text = stringResource(R.string.mentions), onClick = { + InactiveFilterButton(text = stringResource(Res.string.mentions), onClick = { viewModel.changeFilter(NotificationsFilterEnum.Mentions) }) } @@ -195,7 +197,7 @@ fun NotificationsComposable( FullscreenEmptyStateComposable( EmptyState( icon = Icons.Outlined.Email, heading = stringResource( - R.string.you_don_t_have_any_notifications + Res.string.you_don_t_have_any_notifications ) ) ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/CommentsBottomSheet.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/CommentsBottomSheet.kt index 74ecf7d0..94374f55 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/CommentsBottomSheet.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/CommentsBottomSheet.kt @@ -50,7 +50,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.TextFieldValue @@ -60,7 +60,8 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Post import com.daniebeler.pfpixelix.ui.composables.hashtagMentionText.HashtagsMentionsTextView import com.daniebeler.pfpixelix.ui.composables.post.reply.ReplyElementViewModel @@ -126,7 +127,7 @@ fun CommentsBottomSheet( }, replyText, changeText = { newText -> replyText = newText }, - labelStringId = R.string.reply, + labelStringId = Res.string.reply, modifier = null, imeAction = ImeAction.Send, suggestionsBoxColor = MaterialTheme.colorScheme.surface, @@ -197,7 +198,7 @@ fun CommentsBottomSheet( .fillMaxWidth(), horizontalArrangement = Arrangement.Center ) { - Text(text = stringResource(R.string.no_comments_yet)) + Text(text = stringResource(Res.string.no_comments_yet)) } } } @@ -302,7 +303,7 @@ private fun ReplyElement( } TextButton(onClick = { openAddReplyDialog.value = true }) { Text( - text = stringResource(id = R.string.reply), + text = stringResource(Res.string.reply), color = MaterialTheme.colorScheme.onBackground ) } @@ -383,22 +384,22 @@ private fun ReplyElement( tint = MaterialTheme.colorScheme.error ) }, title = { - Text(text = stringResource(R.string.delete_reply)) + Text(text = stringResource(Res.string.delete_reply)) }, text = { - Text(text = stringResource(R.string.this_action_cannot_be_undone)) + Text(text = stringResource(Res.string.this_action_cannot_be_undone)) }, onDismissRequest = { showDeleteReplyDialog.value = false }, confirmButton = { TextButton(onClick = { deleteReply() }) { - Text(stringResource(R.string.delete), color = MaterialTheme.colorScheme.error) + Text(stringResource(Res.string.delete), color = MaterialTheme.colorScheme.error) } }, dismissButton = { TextButton(onClick = { showDeleteReplyDialog.value = false }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } @@ -414,7 +415,7 @@ fun AddReplyDialog( AlertDialog(icon = { Icon(Icons.Outlined.Edit, contentDescription = "Edit") }, title = { - Text(text = stringResource(R.string.reply)) + Text(text = stringResource(Res.string.reply)) }, text = { TextFieldMentionsComposable( submit = { text -> @@ -425,7 +426,7 @@ fun AddReplyDialog( }, text = replyText, changeText = { newText -> replyText = newText }, - R.string.reply, + Res.string.reply, modifier = null, imeAction = ImeAction.Send, submitButton = null, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/LikesBottomSheet.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/LikesBottomSheet.kt index 3023114a..fd4a9713 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/LikesBottomSheet.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/LikesBottomSheet.kt @@ -22,13 +22,14 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.utils.Navigate @@ -42,7 +43,7 @@ fun LikesBottomSheet( .padding(12.dp) ) { Text( - text = stringResource(R.string.liked_by), + text = stringResource(Res.string.liked_by), textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth() ) @@ -74,7 +75,7 @@ fun LikesBottomSheet( .fillMaxWidth(), horizontalArrangement = Arrangement.Center ) { - Text(text = stringResource(R.string.no_likes_yet)) + Text(text = stringResource(Res.string.no_likes_yet)) } } } @@ -104,7 +105,7 @@ private fun LikedByAccountElement(account: Account, navController: NavController Column { Text(text = "@${account.username}") Text( - text = "${account.followersCount} " + stringResource(id = R.string.followers), + text = "${account.followersCount} " + stringResource(Res.string.followers), fontSize = 14.sp, color = MaterialTheme.colorScheme.primary ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/PostComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/PostComposable.kt index 1e0ec956..50691d79 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/PostComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/PostComposable.kt @@ -77,8 +77,8 @@ import androidx.compose.ui.layout.boundsInRoot import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.layout.positionInRoot import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -101,7 +101,8 @@ import androidx.media3.ui.PlayerView import androidx.navigation.NavController import coil3.compose.AsyncImage import coil3.compose.AsyncImagePainter -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.MediaAttachment import com.daniebeler.pfpixelix.domain.model.Post import com.daniebeler.pfpixelix.ui.composables.hashtagMentionText.HashtagsMentionsTextView @@ -114,6 +115,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.launch import net.engawapg.lib.zoomable.snapBackZoomable +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @@ -218,7 +220,7 @@ fun PostComposable( Icon(Icons.Outlined.Cached, contentDescription = "reblogged by") Text( stringResource( - R.string.reblogged_by, + Res.string.reblogged_by, reblogAccount.displayname ?: reblogAccount.username ), fontSize = 12.sp ) @@ -237,7 +239,7 @@ fun PostComposable( ) { AsyncImage( model = viewModel.post!!.account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(36.dp) @@ -282,7 +284,7 @@ fun PostComposable( showBottomSheet = 2 }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.ellipsis_vertical), + imageVector = vectorResource(Res.drawable.ellipsis_vertical), contentDescription = "" ) } @@ -435,7 +437,7 @@ fun PostComposable( Row(verticalAlignment = Alignment.CenterVertically) { if (viewModel.post!!.favourited) { - Icon(imageVector = ImageVector.vectorResource(R.drawable.heart), + Icon(imageVector = vectorResource(Res.drawable.heart), modifier = Modifier .size(24.dp) .clickable { @@ -446,7 +448,7 @@ fun PostComposable( tint = Color(0xFFDD2E44)) } else { Icon( - imageVector = ImageVector.vectorResource(R.drawable.heart_outline), + imageVector = vectorResource(Res.drawable.heart_outline), modifier = Modifier .size(24.dp) .clickable { @@ -469,7 +471,7 @@ fun PostComposable( Spacer(Modifier.width(32.dp)) Icon( - imageVector = ImageVector.vectorResource(R.drawable.chatbubble_outline), + imageVector = vectorResource(Res.drawable.chatbubble_outline), modifier = Modifier .size(24.dp) .clickable { @@ -499,7 +501,7 @@ fun PostComposable( viewModel.unreblogPost(postId) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.sync_outline), + imageVector = vectorResource(Res.drawable.sync_outline), contentDescription = "undo reblog post", tint = MaterialTheme.colorScheme.primary, modifier = Modifier.rotate(boostRotation) @@ -511,7 +513,7 @@ fun PostComposable( viewModel.reblogPost(postId) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.sync_outline), + imageVector = vectorResource(Res.drawable.sync_outline), contentDescription = "reblog post", ) } @@ -524,7 +526,7 @@ fun PostComposable( viewModel.unBookmarkPost(postId) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.bookmark), + imageVector = vectorResource(Res.drawable.bookmark), contentDescription = "unbookmark post" ) } @@ -533,7 +535,7 @@ fun PostComposable( viewModel.bookmarkPost(postId) }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.bookmark_outline), + imageVector = vectorResource(Res.drawable.bookmark_outline), contentDescription = "bookmark post" ) } @@ -544,7 +546,7 @@ fun PostComposable( Row { if (viewModel.post!!.likedBy?.username?.isNotBlank() == true) { Text( - text = stringResource(id = R.string.liked_by) + " ", + text = stringResource(Res.string.liked_by) + " ", fontSize = 14.sp ) Text(text = viewModel.post!!.likedBy!!.username!!, @@ -558,11 +560,11 @@ fun PostComposable( }) if (post.favouritesCount > 1) { Text( - text = " " + stringResource(id = R.string.and) + " ", + text = " " + stringResource(Res.string.and) + " ", fontSize = 14.sp ) Text(text = (viewModel.post!!.favouritesCount - 1).toString() + " " + stringResource( - id = R.string.others + Res.string.others ), fontWeight = FontWeight.Bold, fontSize = 14.sp, @@ -573,7 +575,7 @@ fun PostComposable( } } else { Text( - text = stringResource(id = R.string.no_likes_yet), fontSize = 14.sp + text = stringResource(Res.string.no_likes_yet), fontSize = 14.sp ) } } @@ -596,7 +598,7 @@ fun PostComposable( Spacer(modifier = Modifier.height(6.dp)) Text(text = stringResource( - R.string.view_comments, viewModel.post!!.replyCount + Res.string.view_comments, viewModel.post!!.replyCount ), color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.clickable { @@ -659,22 +661,22 @@ fun PostComposable( AlertDialog(icon = { Icon(imageVector = Icons.Outlined.Delete, contentDescription = null) }, title = { - Text(text = stringResource(R.string.delete_post)) + Text(text = stringResource(Res.string.delete_post)) }, text = { - Text(text = stringResource(R.string.this_action_cannot_be_undone)) + Text(text = stringResource(Res.string.this_action_cannot_be_undone)) }, onDismissRequest = { viewModel.deleteDialog = null }, confirmButton = { TextButton(onClick = { viewModel.deletePost(viewModel.deleteDialog!!) }) { - Text(stringResource(R.string.delete)) + Text(stringResource(Res.string.delete)) } }, dismissButton = { TextButton(onClick = { viewModel.deleteDialog = null }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) @@ -799,7 +801,7 @@ fun PostImage( if (altText.isNotBlank()) { AlertDialog(title = { - Text(text = stringResource(R.string.media_description)) + Text(text = stringResource(Res.string.media_description)) }, text = { Text(text = altText) }, onDismissRequest = { @@ -808,7 +810,7 @@ fun PostImage( TextButton(onClick = { altText = "" }) { - Text(stringResource(id = android.R.string.ok)) + Text(stringResource(Res.string.ok)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/ShareBottomSheet.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/ShareBottomSheet.kt index 04e075e9..b69a5529 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/ShareBottomSheet.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/post/ShareBottomSheet.kt @@ -21,17 +21,20 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.common.Constants import com.daniebeler.pfpixelix.domain.model.MediaAttachment import com.daniebeler.pfpixelix.domain.model.Post import com.daniebeler.pfpixelix.ui.composables.ButtonRowElement import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.Share +import org.jetbrains.compose.resources.getString +import org.jetbrains.compose.resources.vectorResource @Composable fun ShareBottomSheet( @@ -57,14 +60,11 @@ fun ShareBottomSheet( } LaunchedEffect(Unit) { - humanReadableVisibility = if (post.visibility == Constants.AUDIENCE_PUBLIC) { - context.resources.getString(R.string.audience_public) - } else if (post.visibility == Constants.AUDIENCE_UNLISTED) { - context.resources.getString(R.string.unlisted) - } else if (post.visibility == Constants.AUDIENCE_FOLLOWERS_ONLY) { - context.resources.getString(R.string.followers_only) - } else { - post.visibility + humanReadableVisibility = when (post.visibility) { + Constants.AUDIENCE_PUBLIC -> getString(Res.string.audience_public) + Constants.AUDIENCE_UNLISTED -> getString(Res.string.unlisted) + Constants.AUDIENCE_FOLLOWERS_ONLY -> getString(Res.string.followers_only) + else -> post.visibility } } @@ -76,18 +76,18 @@ fun ShareBottomSheet( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth() ) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.eye_outline), + imageVector = vectorResource(Res.drawable.eye_outline), contentDescription = "", Modifier.padding(start = 18.dp, top = 12.dp, bottom = 12.dp) ) Spacer(modifier = Modifier.width(12.dp)) - Text(text = stringResource(R.string.visibility_x, humanReadableVisibility)) + Text(text = stringResource(Res.string.visibility_x, humanReadableVisibility)) } if (mediaAttachment?.license != null) { - ButtonRowElement(icon = R.drawable.document_text_outline, text = stringResource( - R.string.license, mediaAttachment.license.title + ButtonRowElement(icon = Res.drawable.document_text_outline, text = stringResource( + Res.string.license, mediaAttachment.license.title ), onClick = { viewModel.openUrl(mediaAttachment.license.url, context) }) @@ -95,21 +95,21 @@ fun ShareBottomSheet( HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElement(icon = R.drawable.open_outline, text = stringResource( - R.string.open_in_browser + ButtonRowElement(icon = Res.drawable.open_outline, text = stringResource( + Res.string.open_in_browser ), onClick = { viewModel.openUrl(url, context) }) - ButtonRowElement(icon = R.drawable.share_social_outline, - text = stringResource(R.string.share_this_post), + ButtonRowElement(icon = Res.drawable.share_social_outline, + text = stringResource(Res.string.share_this_post), onClick = { Share.shareText(context, url) }) if (mediaAttachment != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && mediaAttachment.type == "image") { - ButtonRowElement(icon = R.drawable.cloud_download_outline, - text = stringResource(R.string.download_image), + ButtonRowElement(icon = Res.drawable.cloud_download_outline, + text = stringResource(Res.string.download_image), onClick = { viewModel.saveImage( @@ -124,15 +124,15 @@ fun ShareBottomSheet( HorizontalDivider(Modifier.padding(12.dp)) ButtonRowElement( - icon = R.drawable.pencil_outline, - text = stringResource(R.string.edit_post), + icon = Res.drawable.pencil_outline, + text = stringResource(Res.string.edit_post), onClick = { Navigate.navigate("edit_post_screen/${post.id}", navController = navController) } ) ButtonRowElement( - icon = R.drawable.trash_outline, - text = stringResource(R.string.delete_this_post), + icon = Res.drawable.trash_outline, + text = stringResource(Res.string.delete_this_post), onClick = { viewModel.deleteDialog = post.id }, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/CollectionsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/CollectionsComposable.kt index 7514dccd..73c1bd13 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/CollectionsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/CollectionsComposable.kt @@ -32,16 +32,18 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @Composable fun CollectionsComposable( @@ -61,7 +63,7 @@ fun CollectionsComposable( Column { Spacer(Modifier.height(12.dp)) Text( - text = stringResource(R.string.collections), + text = stringResource(Res.string.collections), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(start = 12.dp) @@ -119,14 +121,14 @@ fun CollectionsComposable( contentAlignment = Alignment.Center ) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.add_outline), + imageVector = vectorResource(Res.drawable.add_outline), contentDescription = "add collection", Modifier.size(32.dp) ) } Spacer(modifier = Modifier.height(8.dp)) - Text(text = stringResource(R.string.new_), fontSize = 14.sp) + Text(text = stringResource(Res.string.new_), fontSize = 14.sp) } } } @@ -139,10 +141,10 @@ fun CollectionsComposable( if (showAddCollectionDialog.value) { AlertDialog(title = { - Text(text = stringResource(R.string.new_collection)) + Text(text = stringResource(Res.string.new_collection)) }, text = { Column { - Text(text = stringResource(R.string.collection_create_not_supported_explanation)) + Text(text = stringResource(Res.string.collection_create_not_supported_explanation)) Spacer(modifier = Modifier.height(12.dp)) Text( text = "$instanceDomain/i/collections/create", diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/MutualFollowersComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/MutualFollowersComposable.kt index e8986526..581a30c8 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/MutualFollowersComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/MutualFollowersComposable.kt @@ -27,7 +27,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight @@ -36,7 +36,8 @@ import androidx.compose.ui.text.withStyle import androidx.compose.ui.unit.dp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.followers.FollowerElementComposable import com.daniebeler.pfpixelix.utils.Navigate @@ -59,7 +60,7 @@ fun MutualFollowersComposable( val annotatedString = buildAnnotatedString { withStyle(style = normalStyle) { - append(stringResource(R.string.followed_by) + " ") + append(stringResource(Res.string.followed_by) + " ") withStyle(style = boldStyle) { pushStringAnnotation( tag = "account", @@ -70,7 +71,7 @@ fun MutualFollowersComposable( } if (listSize == 2) { - append(" " + stringResource(R.string.and) + " ") + append(" " + stringResource(Res.string.and) + " ") } if (listSize > 2) { append(", ") @@ -85,7 +86,7 @@ fun MutualFollowersComposable( } if (listSize == 3) { - append(" " + stringResource(R.string.and) + " ") + append(" " + stringResource(Res.string.and) + " ") withStyle(style = boldStyle) { pushStringAnnotation( tag = "account", @@ -105,15 +106,15 @@ fun MutualFollowersComposable( append(mutualFollowersState.mutualFollowers[2].username) pop() } - append(" " + stringResource(id = R.string.and) + " ") + append(" " + stringResource(Res.string.and) + " ") withStyle(style = SpanStyle(fontWeight = FontWeight.Bold)) { pushStringAnnotation(tag = "others", annotation = "others") append((listSize - 3).toString()) if (listSize == 4) { - append(" " + stringResource(R.string.other)) + append(" " + stringResource(Res.string.other)) } else { - append(" " + stringResource(R.string.others)) + append(" " + stringResource(Res.string.others)) } pop() @@ -208,7 +209,7 @@ fun MutualFollowersComposable( item { Text( - text = stringResource(R.string.mutual_followers), + text = stringResource(Res.string.mutual_followers), textAlign = TextAlign.Center, modifier = Modifier.fillMaxWidth() ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/ProfileTopSection.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/ProfileTopSection.kt index 0ea44e33..0bf7cf6a 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/ProfileTopSection.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/ProfileTopSection.kt @@ -25,14 +25,15 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.domain.model.Relationship import com.daniebeler.pfpixelix.ui.composables.hashtagMentionText.HashtagsMentionsTextView @@ -54,7 +55,7 @@ fun ProfileTopSection( Row(verticalAlignment = Alignment.CenterVertically) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(76.dp) @@ -72,7 +73,7 @@ fun ProfileTopSection( fontWeight = FontWeight.Bold, fontSize = 18.sp ) - Text(text = stringResource(R.string.posts), fontSize = 12.sp) + Text(text = stringResource(Res.string.posts), fontSize = 12.sp) } Column(horizontalAlignment = Alignment.CenterHorizontally, @@ -86,7 +87,7 @@ fun ProfileTopSection( fontWeight = FontWeight.Bold, fontSize = 18.sp ) - Text(text = stringResource(R.string.followers), fontSize = 12.sp) + Text(text = stringResource(Res.string.followers), fontSize = 12.sp) } Column(horizontalAlignment = Alignment.CenterHorizontally, @@ -100,7 +101,7 @@ fun ProfileTopSection( fontWeight = FontWeight.Bold, fontSize = 18.sp ) - Text(text = stringResource(R.string.following), fontSize = 12.sp) + Text(text = stringResource(Res.string.following), fontSize = 12.sp) } } } @@ -124,22 +125,22 @@ fun ProfileTopSection( Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { if (account.isAdmin) { - ProfileBadge(text = stringResource(id = R.string.admin)) + ProfileBadge(text = stringResource(Res.string.admin)) } if (relationship != null && relationship.followedBy) { - ProfileBadge(text = stringResource(R.string.follows_you)) + ProfileBadge(text = stringResource(Res.string.follows_you)) } if (relationship != null && relationship.muting) { ProfileBadge( - text = stringResource(R.string.muted), + text = stringResource(Res.string.muted), color = MaterialTheme.colorScheme.error ) } if (relationship != null && relationship.blocking) { ProfileBadge( - text = stringResource(R.string.blocked), + text = stringResource(Res.string.blocked), color = MaterialTheme.colorScheme.error ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/SwitchViewComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/SwitchViewComposable.kt index 08539121..06ba472b 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/SwitchViewComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/SwitchViewComposable.kt @@ -19,12 +19,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.daniebeler.pfpixelix.R +import org.jetbrains.compose.resources.vectorResource +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* @Composable fun SwitchViewComposable( @@ -45,7 +47,7 @@ fun SwitchViewComposable( ) { Row(verticalAlignment = Alignment.CenterVertically) { Text(text = postsCount.toString(), fontWeight = FontWeight.Bold, fontSize = 18.sp) - Text(text = " " + stringResource(id = R.string.posts), fontSize = 12.sp) + Text(text = " " + stringResource(Res.string.posts), fontSize = 12.sp) } Row { @@ -61,9 +63,9 @@ fun SwitchViewComposable( )) { Icon( imageVector = if(viewType == ViewEnum.Grid) { - ImageVector.vectorResource(R.drawable.grid) + vectorResource(Res.drawable.grid) } else { - ImageVector.vectorResource(R.drawable.grid_outline) + vectorResource(Res.drawable.grid_outline) }, modifier = Modifier.size(24.dp), contentDescription = "grid view" @@ -81,9 +83,9 @@ fun SwitchViewComposable( )) { Icon( imageVector = if(viewType == ViewEnum.Grid) { - ImageVector.vectorResource(R.drawable.reorder_four_outline) + vectorResource(Res.drawable.reorder_four_outline) } else { - ImageVector.vectorResource(R.drawable.reorder_four) + vectorResource(Res.drawable.reorder_four) }, contentDescription = "timeline view" ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/other_profile/OtherProfileComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/other_profile/OtherProfileComposable.kt index d43be389..b74c9158 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/other_profile/OtherProfileComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/other_profile/OtherProfileComposable.kt @@ -52,8 +52,8 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -61,7 +61,8 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.ui.composables.ButtonRowElement import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler @@ -75,6 +76,7 @@ import com.daniebeler.pfpixelix.ui.composables.profile.server_stats.DomainSoftwa import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.utils.Navigate import com.daniebeler.pfpixelix.utils.Share +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterialApi::class) @Composable @@ -129,7 +131,7 @@ fun OtherProfileComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }, actions = { @@ -222,9 +224,9 @@ fun OtherProfileComposable( ) } else { if (viewModel.relationshipState.accountRelationship?.following == true) { - Text(text = stringResource(R.string.unfollow)) + Text(text = stringResource(Res.string.unfollow)) } else { - Text(text = stringResource(R.string.follow)) + Text(text = stringResource(Res.string.follow)) } } } @@ -245,7 +247,7 @@ fun OtherProfileComposable( contentColor = MaterialTheme.colorScheme.onSecondaryContainer ) ) { - Text(text = stringResource(R.string.message)) + Text(text = stringResource(Res.string.message)) } } @@ -297,17 +299,17 @@ fun OtherProfileComposable( ) { if (viewModel.relationshipState.accountRelationship != null) { if (viewModel.relationshipState.accountRelationship!!.muting) { - ButtonRowElement(icon = R.drawable.remove_circle_outline, + ButtonRowElement(icon = Res.drawable.remove_circle_outline, text = stringResource( - R.string.unmute_this_profile + Res.string.unmute_this_profile ), onClick = { showUnMuteAlert = true }) } else { - ButtonRowElement(icon = R.drawable.remove_circle_outline, + ButtonRowElement(icon = Res.drawable.remove_circle_outline, text = stringResource( - R.string.mute_this_profile + Res.string.mute_this_profile ), onClick = { showMuteAlert = true @@ -315,14 +317,14 @@ fun OtherProfileComposable( } if (viewModel.relationshipState.accountRelationship!!.blocking) { - ButtonRowElement(icon = R.drawable.remove_circle_outline, text = stringResource( - R.string.unblock_this_profile + ButtonRowElement(icon = Res.drawable.remove_circle_outline, text = stringResource( + Res.string.unblock_this_profile ), onClick = { showUnBlockAlert = true }) } else { - ButtonRowElement(icon = R.drawable.remove_circle_outline, text = stringResource( - R.string.block_this_profile + ButtonRowElement(icon = Res.drawable.remove_circle_outline, text = stringResource( + Res.string.block_this_profile ), onClick = { showBlockAlert = true }) @@ -331,14 +333,14 @@ fun OtherProfileComposable( HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElement(icon = R.drawable.browsers_outline, text = stringResource( - R.string.open_in_browser + ButtonRowElement(icon = Res.drawable.browsers_outline, text = stringResource( + Res.string.open_in_browser ), onClick = { viewModel.openUrl(viewModel.accountState.account!!.url, context) }) - ButtonRowElement(icon = R.drawable.share_social_outline, - text = stringResource(R.string.share_this_profile), + ButtonRowElement(icon = Res.drawable.share_social_outline, + text = stringResource(Res.string.share_this_profile), onClick = { Share.shareText(context, viewModel.accountState.account!!.url) }) @@ -381,7 +383,7 @@ fun MuteAccountAlert( onDismissRequest: () -> Unit, onConfirmation: () -> Unit, account: Account ) { AlertDialog(title = { - Text(text = stringResource(R.string.mute_account)) + Text(text = stringResource(Res.string.mute_account)) }, text = { Column { @@ -389,14 +391,14 @@ fun MuteAccountAlert( HorizontalDivider(Modifier.padding(vertical = 12.dp)) - Text(text = stringResource(R.string.mute_consequence_1)) - Text(text = stringResource(R.string.mute_consequence_2)) - Text(text = stringResource(R.string.mute_consequence_3)) - Text(text = stringResource(R.string.mute_consequence_4)) + Text(text = stringResource(Res.string.mute_consequence_1)) + Text(text = stringResource(Res.string.mute_consequence_2)) + Text(text = stringResource(Res.string.mute_consequence_3)) + Text(text = stringResource(Res.string.mute_consequence_4)) HorizontalDivider(Modifier.padding(vertical = 12.dp)) - Text(text = stringResource(R.string.mute_consequence_5)) + Text(text = stringResource(Res.string.mute_consequence_5)) } }, onDismissRequest = { @@ -405,13 +407,13 @@ fun MuteAccountAlert( TextButton(onClick = { onConfirmation() }) { - Text(stringResource(R.string.mute)) + Text(stringResource(Res.string.mute)) } }, dismissButton = { TextButton(onClick = { onDismissRequest() }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } @@ -421,7 +423,7 @@ fun UnMuteAccountAlert( onDismissRequest: () -> Unit, onConfirmation: () -> Unit, account: Account ) { AlertDialog(title = { - Text(text = stringResource(R.string.unmute_account)) + Text(text = stringResource(Res.string.unmute_account)) }, text = { AlertTopSection(account = account) @@ -432,13 +434,13 @@ fun UnMuteAccountAlert( TextButton(onClick = { onConfirmation() }) { - Text(stringResource(id = R.string.unmute_caps)) + Text(stringResource(Res.string.unmute_caps)) } }, dismissButton = { TextButton(onClick = { onDismissRequest() }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } @@ -448,7 +450,7 @@ fun BlockAccountAlert( onDismissRequest: () -> Unit, onConfirmation: () -> Unit, account: Account ) { AlertDialog(title = { - Text(text = stringResource(R.string.block_account)) + Text(text = stringResource(Res.string.block_account)) }, text = { Column { @@ -456,22 +458,22 @@ fun BlockAccountAlert( HorizontalDivider(Modifier.padding(vertical = 12.dp)) - Text(text = stringResource(R.string.block_consequence_1)) - Text(text = stringResource(R.string.block_consequence_2)) - Text(text = stringResource(R.string.block_consequence_3)) - Text(text = stringResource(R.string.block_consequence_4)) - Text(text = stringResource(R.string.block_consequence_5)) + Text(text = stringResource(Res.string.block_consequence_1)) + Text(text = stringResource(Res.string.block_consequence_2)) + Text(text = stringResource(Res.string.block_consequence_3)) + Text(text = stringResource(Res.string.block_consequence_4)) + Text(text = stringResource(Res.string.block_consequence_5)) HorizontalDivider(Modifier.padding(vertical = 12.dp)) - Text(text = stringResource(R.string.block_consequence_6)) - Text(text = stringResource(R.string.block_consequence_7)) - Text(text = stringResource(R.string.block_consequence_8)) - Text(text = stringResource(R.string.block_consequence_9)) + Text(text = stringResource(Res.string.block_consequence_6)) + Text(text = stringResource(Res.string.block_consequence_7)) + Text(text = stringResource(Res.string.block_consequence_8)) + Text(text = stringResource(Res.string.block_consequence_9)) HorizontalDivider(Modifier.padding(vertical = 12.dp)) - Text(text = stringResource(R.string.block_consequence_10)) + Text(text = stringResource(Res.string.block_consequence_10)) } }, onDismissRequest = { onDismissRequest() @@ -479,13 +481,13 @@ fun BlockAccountAlert( TextButton(onClick = { onConfirmation() }) { - Text(stringResource(R.string.block)) + Text(stringResource(Res.string.block)) } }, dismissButton = { TextButton(onClick = { onDismissRequest() }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) @@ -496,7 +498,7 @@ fun UnBlockAccountAlert( onDismissRequest: () -> Unit, onConfirmation: () -> Unit, account: Account ) { AlertDialog(title = { - Text(text = stringResource(id = R.string.unblock_account)) + Text(text = stringResource(Res.string.unblock_account)) }, text = { AlertTopSection(account = account) }, onDismissRequest = { @@ -505,13 +507,13 @@ fun UnBlockAccountAlert( TextButton(onClick = { onConfirmation() }) { - Text(stringResource(id = R.string.unblock_caps)) + Text(stringResource(Res.string.unblock_caps)) } }, dismissButton = { TextButton(onClick = { onDismissRequest() }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } @@ -523,7 +525,7 @@ fun AlertTopSection(account: Account) { ) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/AccountSwitchBottomSheet.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/AccountSwitchBottomSheet.kt index 9b8e01d1..571f1cf2 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/AccountSwitchBottomSheet.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/AccountSwitchBottomSheet.kt @@ -26,12 +26,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.loginDataToAccount import com.daniebeler.pfpixelix.gotoLoginActivity import com.daniebeler.pfpixelix.ui.composables.custom_account.CustomAccount @@ -51,7 +52,7 @@ fun AccountSwitchBottomSheet( Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { if (viewModel.currentlyLoggedIn.currentAccount != null) { Text( - text = stringResource(R.string.current_account), + text = stringResource(Res.string.current_account), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(start = 12.dp) @@ -60,7 +61,7 @@ fun AccountSwitchBottomSheet( } if (viewModel.otherAccounts.otherAccounts.isNotEmpty()) { Text( - text = stringResource(R.string.other_accounts), + text = stringResource(Res.string.other_accounts), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(start = 12.dp) @@ -106,7 +107,7 @@ fun AccountSwitchBottomSheet( } Spacer(modifier = Modifier.width(10.dp)) Text( - text = stringResource(R.string.add_pixelfed_account), + text = stringResource(Res.string.add_pixelfed_account), lineHeight = 8.sp, fontWeight = FontWeight.Bold ) @@ -115,9 +116,9 @@ fun AccountSwitchBottomSheet( if (showRemoveLoginDataAlert.value.isNotBlank()) { AlertDialog(title = { - Text(text = stringResource(R.string.remove_account)) + Text(text = stringResource(Res.string.remove_account)) }, text = { - Text(text = stringResource(R.string.are_you_sure_you_want_to_remove_this_account)) + Text(text = stringResource(Res.string.are_you_sure_you_want_to_remove_this_account)) }, onDismissRequest = { showRemoveLoginDataAlert.value = "" }, confirmButton = { @@ -127,13 +128,13 @@ fun AccountSwitchBottomSheet( showRemoveLoginDataAlert.value = "" } }) { - Text(stringResource(R.string.remove)) + Text(stringResource(Res.string.remove)) } }, dismissButton = { TextButton(onClick = { showRemoveLoginDataAlert.value = "" }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/ModalBottomSheetContent.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/ModalBottomSheetContent.kt index ec47e91c..e591b364 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/ModalBottomSheetContent.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/ModalBottomSheetContent.kt @@ -9,10 +9,11 @@ import androidx.compose.material3.HorizontalDivider import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.ImageBitmap -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.ButtonRowElement import com.daniebeler.pfpixelix.ui.composables.ButtonRowElementWithRoundedImage import com.daniebeler.pfpixelix.utils.Navigate @@ -29,8 +30,8 @@ fun ModalBottomSheetContent( ) { ButtonRowElement( - icon = R.drawable.settings_outline, - text = stringResource(R.string.settings), + icon = Res.drawable.settings_outline, + text = stringResource(Res.string.settings), onClick = { closeBottomSheet() openPreferencesDrawer() @@ -38,36 +39,36 @@ fun ModalBottomSheetContent( HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElement(icon = R.drawable.heart_outline, - text = stringResource(R.string.liked_posts), + ButtonRowElement(icon = Res.drawable.heart_outline, + text = stringResource(Res.string.liked_posts), onClick = { closeBottomSheet() Navigate.navigate("liked_posts_screen", navController) }) - ButtonRowElement(icon = R.drawable.bookmarks_outline, - text = stringResource(R.string.bookmarked_posts), + ButtonRowElement(icon = Res.drawable.bookmarks_outline, + text = stringResource(Res.string.bookmarked_posts), onClick = { closeBottomSheet() Navigate.navigate("bookmarked_posts_screen", navController) }) - ButtonRowElement(icon = R.drawable.hash, - text = stringResource(R.string.followed_hashtags), + ButtonRowElement(icon = Res.drawable.hash, + text = stringResource(Res.string.followed_hashtags), onClick = { closeBottomSheet() Navigate.navigate("followed_hashtags_screen", navController) }) - ButtonRowElement(icon = R.drawable.remove_circle_outline, - text = stringResource(R.string.muted_accounts), + ButtonRowElement(icon = Res.drawable.remove_circle_outline, + text = stringResource(Res.string.muted_accounts), onClick = { closeBottomSheet() Navigate.navigate("muted_accounts_screen", navController) }) - ButtonRowElement(icon = R.drawable.remove_circle_outline, - text = stringResource(R.string.blocked_accounts), + ButtonRowElement(icon = Res.drawable.remove_circle_outline, + text = stringResource(Res.string.blocked_accounts), onClick = { closeBottomSheet() Navigate.navigate("blocked_accounts_screen", navController) @@ -75,23 +76,23 @@ fun ModalBottomSheetContent( HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElementWithRoundedImage(icon = R.drawable.pixelfed_logo, - text = stringResource(R.string.about_x, instanceDomain), + ButtonRowElementWithRoundedImage(icon = Res.drawable.pixelfed_logo, + text = stringResource(Res.string.about_x, instanceDomain), onClick = { closeBottomSheet() Navigate.navigate("about_instance_screen", navController) }) if (appIcon == null) { - ButtonRowElementWithRoundedImage(icon = R.drawable.pixelix_logo, - text = stringResource(id = R.string.about_pixelix), + ButtonRowElementWithRoundedImage(icon = Res.drawable.pixelix_logo, + text = stringResource(Res.string.about_pixelix), onClick = { closeBottomSheet() Navigate.navigate("about_pixelix_screen", navController) }) } else { ButtonRowElement(icon = appIcon, - text = stringResource(id = R.string.about_pixelix), + text = stringResource(Res.string.about_pixelix), onClick = { closeBottomSheet() Navigate.navigate("about_pixelix_screen", navController) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/OwnProfileComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/OwnProfileComposable.kt index b28b7bac..fb535480 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/OwnProfileComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/own_profile/OwnProfileComposable.kt @@ -41,13 +41,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfiniteListHandler import com.daniebeler.pfpixelix.ui.composables.profile.CollectionsComposable import com.daniebeler.pfpixelix.ui.composables.profile.PostsWrapperComposable @@ -152,7 +153,7 @@ fun OwnProfileComposable( contentColor = MaterialTheme.colorScheme.onSurface ) ) { - Text(text = stringResource(id = R.string.edit_profile)) + Text(text = stringResource(Res.string.edit_profile)) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/server_stats/ServerStatsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/server_stats/ServerStatsComposable.kt index 597f015d..b99b6858 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/server_stats/ServerStatsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/profile/server_stats/ServerStatsComposable.kt @@ -35,14 +35,15 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import java.util.Locale @OptIn(ExperimentalMaterial3Api::class) @@ -61,7 +62,7 @@ fun DomainSoftwareComposable( } if (viewModel.statsState.fediSoftware?.icon != null) { - Image(painterResource(id = viewModel.statsState.fediSoftware!!.icon!!), + Image(painterResource(viewModel.statsState.fediSoftware!!.icon!!), contentDescription = viewModel.statsState.fediSoftware!!.name, modifier = Modifier .height(24.dp) @@ -90,7 +91,7 @@ fun DomainSoftwareComposable( modifier = Modifier.fillMaxWidth() ) { Image( - painterResource(id = viewModel.statsState.fediSoftware!!.icon!!), + painterResource(viewModel.statsState.fediSoftware!!.icon!!), contentDescription = null, modifier = Modifier.height(56.dp) ) @@ -111,7 +112,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.instances)) + Text(stringResource(Res.string.instances)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -127,7 +128,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.total_posts)) + Text(stringResource(Res.string.total_posts)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -143,7 +144,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.total_users)) + Text(stringResource(Res.string.total_users)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -159,7 +160,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.active_users)) + Text(stringResource(Res.string.active_users)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -186,7 +187,7 @@ fun DomainSoftwareComposable( ) { Text( text = stringResource( - R.string.visit_url, viewModel.statsState.fediSoftware!!.website + Res.string.visit_url, viewModel.statsState.fediSoftware!!.website ) ) } @@ -218,7 +219,7 @@ fun DomainSoftwareComposable( Row { Text( stringResource( - R.string.server_version, + Res.string.server_version, viewModel.statsState.fediServer!!.software.name, viewModel.statsState.fediServer!!.software.version ) @@ -282,7 +283,7 @@ fun DomainSoftwareComposable( Row { - Text(stringResource(R.string.total_posts)) + Text(stringResource(Res.string.total_posts)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -296,7 +297,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.total_users)) + Text(stringResource(Res.string.total_users)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -310,7 +311,7 @@ fun DomainSoftwareComposable( Spacer(modifier = Modifier.height(12.dp)) Row { - Text(stringResource(R.string.active_users)) + Text(stringResource(Res.string.active_users)) Spacer(Modifier.width(8.dp)) Text( text = String.format( @@ -335,7 +336,7 @@ fun DomainSoftwareComposable( ) { Text( text = stringResource( - R.string.visit_url, + Res.string.visit_url, ("https://" + viewModel.statsState.fediServer!!.domain) ) ) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_instance/AboutInstanceComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_instance/AboutInstanceComposable.kt index 5d13dce8..57cc60ae 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_instance/AboutInstanceComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_instance/AboutInstanceComposable.kt @@ -30,8 +30,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp @@ -39,10 +39,12 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenLoadingComposable import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource import java.util.Locale @OptIn(ExperimentalMaterial3Api::class) @@ -64,7 +66,7 @@ fun AboutInstanceComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -87,7 +89,7 @@ fun AboutInstanceComposable( Spacer(modifier = Modifier.height(18.dp)) Text( - text = stringResource(R.string.stats), + text = stringResource(Res.string.stats), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) @@ -105,7 +107,7 @@ fun AboutInstanceComposable( viewModel.instanceState.instance?.stats?.userCount ), fontWeight = FontWeight.Bold, fontSize = 18.sp ) - Text(text = stringResource(R.string.users), fontSize = 12.sp) + Text(text = stringResource(Res.string.users), fontSize = 12.sp) } Column(horizontalAlignment = Alignment.CenterHorizontally) { @@ -116,7 +118,7 @@ fun AboutInstanceComposable( viewModel.instanceState.instance?.stats?.statusCount ), fontWeight = FontWeight.Bold, fontSize = 18.sp ) - Text(text = stringResource(id = R.string.posts), fontSize = 12.sp) + Text(text = stringResource(Res.string.posts), fontSize = 12.sp) } } @@ -124,7 +126,7 @@ fun AboutInstanceComposable( viewModel.instanceState.instance?.admin?.let { account -> Text( - text = stringResource(R.string.admin), + text = stringResource(Res.string.admin), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) @@ -141,7 +143,7 @@ fun AboutInstanceComposable( verticalAlignment = Alignment.CenterVertically) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(46.dp) @@ -161,7 +163,7 @@ fun AboutInstanceComposable( Spacer(modifier = Modifier.height(18.dp)) Text( - text = stringResource(R.string.privacy_policy), + text = stringResource(Res.string.privacy_policy), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) @@ -184,7 +186,7 @@ fun AboutInstanceComposable( Text( - text = stringResource(R.string.terms_of_use), + text = stringResource(Res.string.terms_of_use), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) @@ -206,7 +208,7 @@ fun AboutInstanceComposable( Spacer(modifier = Modifier.height(18.dp)) Text( - text = stringResource(R.string.rules), + text = stringResource(Res.string.rules), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) @@ -230,7 +232,7 @@ fun AboutInstanceComposable( Spacer(modifier = Modifier.height(18.dp)) Text( - text = stringResource(R.string.instance_version), + text = stringResource(Res.string.instance_version), fontWeight = FontWeight.Bold, fontSize = 18.sp, modifier = Modifier.padding(12.dp, 0.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_pixelix/AboutPixelixComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_pixelix/AboutPixelixComposable.kt index 72ea8729..63eee7e4 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_pixelix/AboutPixelixComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/about_pixelix/AboutPixelixComposable.kt @@ -37,8 +37,8 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign @@ -46,9 +46,11 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.ButtonRowElement import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -69,13 +71,13 @@ fun AboutPixelixComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(text = stringResource(R.string.about_pixelix), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.about_pixelix), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -94,7 +96,7 @@ fun AboutPixelixComposable( ) { if (viewModel.appIcon == null) { Image( - painter = painterResource(id = R.drawable.pixelix_logo), + painter = painterResource(Res.drawable.pixelix_logo), contentDescription = null, Modifier .width(84.dp) @@ -128,23 +130,23 @@ fun AboutPixelixComposable( HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElement(icon = R.drawable.star_outline, + ButtonRowElement(icon = Res.drawable.star_outline, text = "Rate Pixelix on Google Play Store", onClick = { viewModel.rateApp(context) }) HorizontalDivider(Modifier.padding(12.dp)) - ButtonRowElement(icon = R.drawable.browsers_outline, + ButtonRowElement(icon = Res.drawable.browsers_outline, text = "Homepage", smallText = "https://app.pixelix.social", onClick = { viewModel.openUrl("https://app.pixelix.social", context) }) - ButtonRowElement(icon = R.drawable.shield_outline, + ButtonRowElement(icon = Res.drawable.shield_outline, text = "Privacy Policy", smallText = "https://app.pixelix.social/privacy", onClick = { viewModel.openUrl("https://app.pixelix.social/privacy", context) }) - ButtonRowElement(icon = R.drawable.code_slash_outline, + ButtonRowElement(icon = Res.drawable.code_slash_outline, text = "Source Code", smallText = "https://github.com/daniebeler/pixelix", onClick = { viewModel.openUrl("https://github.com/daniebeler/pixelix", context) }) @@ -154,7 +156,7 @@ fun AboutPixelixComposable( Text( - text = stringResource(R.string.developed_by), + text = stringResource(Res.string.developed_by), fontSize = 18.sp, modifier = Modifier .padding(12.dp, 0.dp) @@ -172,7 +174,7 @@ fun AboutPixelixComposable( Text(text = "Emanuel Hiebeler", fontWeight = FontWeight.Bold) Row { - Image(painter = painterResource(id = R.drawable.pixelfed_logo), + Image(painter = painterResource(Res.drawable.pixelfed_logo), contentDescription = null, Modifier .width(32.dp) @@ -185,7 +187,7 @@ fun AboutPixelixComposable( Spacer(modifier = Modifier.width(16.dp)) - Image(painter = painterResource(id = R.drawable.mastodon_logo), + Image(painter = painterResource(Res.drawable.mastodon_logo), contentDescription = null, Modifier .width(32.dp) @@ -219,7 +221,7 @@ fun AboutPixelixComposable( Text(text = "Daniel Hiebeler", fontWeight = FontWeight.Bold) Row { - Image(painter = painterResource(id = R.drawable.pixelfed_logo), + Image(painter = painterResource(Res.drawable.pixelfed_logo), contentDescription = null, Modifier .width(32.dp) @@ -232,7 +234,7 @@ fun AboutPixelixComposable( Spacer(modifier = Modifier.width(16.dp)) - Image(painter = painterResource(id = R.drawable.mastodon_logo), + Image(painter = painterResource(Res.drawable.mastodon_logo), contentDescription = null, Modifier .width(32.dp) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/BlockedAccountsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/BlockedAccountsComposable.kt index c173e22d..b9ae072e 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/BlockedAccountsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/BlockedAccountsComposable.kt @@ -23,16 +23,18 @@ import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenLoadingComposable +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterialApi::class) @Composable @@ -43,14 +45,14 @@ fun BlockedAccountsComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { Text( - text = stringResource(id = R.string.blocked_accounts), fontWeight = FontWeight.Bold + text = stringResource(Res.string.blocked_accounts), fontWeight = FontWeight.Bold ) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -88,7 +90,7 @@ fun BlockedAccountsComposable( } if (!viewModel.blockedAccountsState.isLoading && viewModel.blockedAccountsState.error.isEmpty()) { - FullscreenEmptyStateComposable(EmptyState(heading = stringResource(id = R.string.no_blocked_accounts))) + FullscreenEmptyStateComposable(EmptyState(heading = stringResource(Res.string.no_blocked_accounts))) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/CustomBlockedAccountRow.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/CustomBlockedAccountRow.kt index 389bdfd8..35cbe73b 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/CustomBlockedAccountRow.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/blocked_accounts/CustomBlockedAccountRow.kt @@ -14,13 +14,14 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.ui.composables.profile.other_profile.UnBlockAccountAlert import com.daniebeler.pfpixelix.utils.Navigate @@ -41,7 +42,7 @@ fun CustomBlockedAccountRow( }) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(32.dp) @@ -57,7 +58,7 @@ fun CustomBlockedAccountRow( Button(onClick = { viewModel.unblockAccountAlert = account.id }) { - Text(text = stringResource(R.string.unblock)) + Text(text = stringResource(Res.string.unblock)) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/bookmarked_posts/BookmarkedPostsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/bookmarked_posts/BookmarkedPostsComposable.kt index 8c3ce392..76033039 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/bookmarked_posts/BookmarkedPostsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/bookmarked_posts/BookmarkedPostsComposable.kt @@ -18,14 +18,16 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfinitePostsGrid import com.daniebeler.pfpixelix.ui.composables.states.EmptyState +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -36,13 +38,13 @@ fun BookmarkedPostsComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(id = R.string.bookmarked_posts), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.bookmarked_posts), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -58,7 +60,7 @@ fun BookmarkedPostsComposable( isRefreshing = viewModel.bookmarkedPostsState.isRefreshing, error = viewModel.bookmarkedPostsState.error, endReached = false, - emptyMessage = EmptyState(heading = stringResource(R.string.no_bookmarked_posts)), + emptyMessage = EmptyState(heading = stringResource(Res.string.no_bookmarked_posts)), navController = navController, getItemsPaginated = { /*TODO*/ }, onRefresh = { viewModel.getBookmarkedPosts(true) }) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/followed_hashtags/FollowedHashtagsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/followed_hashtags/FollowedHashtagsComposable.kt index 326b9222..38705f7f 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/followed_hashtags/FollowedHashtagsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/followed_hashtags/FollowedHashtagsComposable.kt @@ -23,19 +23,21 @@ import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.CustomHashtag import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenLoadingComposable import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterialApi::class) @Composable @@ -45,13 +47,13 @@ fun FollowedHashtagsComposable( ) { Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(id = R.string.followed_hashtags), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.followed_hashtags), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -84,7 +86,7 @@ fun FollowedHashtagsComposable( if (!viewModel.followedHashtagsState.isLoading && viewModel.followedHashtagsState.error.isEmpty()) { FullscreenEmptyStateComposable( EmptyState(icon = Icons.Outlined.Tag, - heading = stringResource(R.string.no_followed_hashtags), + heading = stringResource(Res.string.no_followed_hashtags), message = "Followed hashtags will appear here", buttonText = "Explore trending hashtags", onClick = { diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionComposable.kt index 9155dca4..c585a2fa 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionComposable.kt @@ -42,13 +42,15 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import org.jetbrains.compose.resources.vectorResource +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* @OptIn(ExperimentalMaterial3Api::class) @@ -76,7 +78,7 @@ fun IconSelectionComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -100,7 +102,7 @@ fun IconSelectionComposable( item (span = { GridItemSpan(3) }) { Column { Row { - Text(text = stringResource(R.string.two_icons_info)) + Text(text = stringResource(Res.string.two_icons_info)) } HorizontalDivider(Modifier.padding(vertical = 12.dp)) @@ -151,9 +153,9 @@ fun IconSelectionComposable( if (newIconName.value.isNotBlank()) { AlertDialog(title = { - Text(text = stringResource(R.string.change_app_icon)) + Text(text = stringResource(Res.string.change_app_icon)) }, text = { - Text(text = stringResource(R.string.change_app_icon_dialog_content)) + Text(text = stringResource(Res.string.change_app_icon_dialog_content)) }, onDismissRequest = { newIconName.value = "" }, confirmButton = { @@ -161,13 +163,13 @@ fun IconSelectionComposable( viewModel.changeIcon(context = context, newIconName.value) newIconName.value = "" }) { - Text(stringResource(R.string.change)) + Text(stringResource(Res.string.change)) } }, dismissButton = { TextButton(onClick = { newIconName.value = "" }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionViewModel.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionViewModel.kt index 09f3188a..e41237db 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionViewModel.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/icon_selection/IconSelectionViewModel.kt @@ -10,6 +10,8 @@ import androidx.core.content.res.ResourcesCompat import androidx.core.graphics.drawable.toBitmap import androidx.lifecycle.ViewModel import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.common.IconsHolder import com.daniebeler.pfpixelix.domain.usecase.DisableAllCustomAppIconsUseCase import com.daniebeler.pfpixelix.domain.usecase.EnableCustomAppIconUseCase diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/liked_posts/LikedPostsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/liked_posts/LikedPostsComposable.kt index 493d0899..9d049475 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/liked_posts/LikedPostsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/liked_posts/LikedPostsComposable.kt @@ -19,14 +19,16 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfinitePostsGrid import com.daniebeler.pfpixelix.ui.composables.states.EmptyState +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -37,13 +39,13 @@ fun LikedPostsComposable( Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(stringResource(id = R.string.liked_posts), fontWeight = FontWeight.Bold) + Text(stringResource(Res.string.liked_posts), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -61,7 +63,7 @@ fun LikedPostsComposable( error = viewModel.likedPostsState.error, emptyMessage = EmptyState( icon = Icons.Outlined.FavoriteBorder, - heading = stringResource(R.string.no_liked_posts) + heading = stringResource(Res.string.no_liked_posts) ), navController = navController, getItemsPaginated = { diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/CustomMutedAccountRow.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/CustomMutedAccountRow.kt index f0706bc2..8a9e1698 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/CustomMutedAccountRow.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/CustomMutedAccountRow.kt @@ -14,13 +14,14 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.navigation.NavController import coil3.compose.AsyncImage -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.domain.model.Account import com.daniebeler.pfpixelix.ui.composables.profile.other_profile.UnMuteAccountAlert import com.daniebeler.pfpixelix.utils.Navigate @@ -44,7 +45,7 @@ fun CustomMutedAccountRow( ) { AsyncImage( model = account.avatar, - error = painterResource(id = R.drawable.default_avatar), + error = painterResource(Res.drawable.default_avatar), contentDescription = "", modifier = Modifier .height(32.dp) @@ -60,7 +61,7 @@ fun CustomMutedAccountRow( Button(onClick = { viewModel.unmuteAccountAlert = account.id }) { - Text(text = stringResource(R.string.unmute)) + Text(text = stringResource(Res.string.unmute)) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/MutedAccountsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/MutedAccountsComposable.kt index 1497d245..6ce012b1 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/MutedAccountsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/muted_accounts/MutedAccountsComposable.kt @@ -22,16 +22,18 @@ import androidx.compose.material3.pulltorefresh.PullToRefreshBox import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.ui.composables.states.FullscreenEmptyStateComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.FullscreenLoadingComposable +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterialApi::class) @Composable @@ -41,13 +43,13 @@ fun MutedAccountsComposable( ) { Scaffold(contentWindowInsets = WindowInsets.systemBars.only(WindowInsetsSides.Top), topBar = { CenterAlignedTopAppBar(title = { - Text(text = stringResource(id = R.string.muted_accounts), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.muted_accounts), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) @@ -85,7 +87,7 @@ fun MutedAccountsComposable( } if (!viewModel.mutedAccountsState.isLoading && viewModel.mutedAccountsState.error.isEmpty()) { - FullscreenEmptyStateComposable(EmptyState(heading = stringResource(R.string.no_muted_accounts))) + FullscreenEmptyStateComposable(EmptyState(heading = stringResource(Res.string.no_muted_accounts))) } } } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/PreferencesComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/PreferencesComposable.kt index 62a5295e..b15a849d 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/PreferencesComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/PreferencesComposable.kt @@ -25,7 +25,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign @@ -34,6 +34,8 @@ import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.ClearCachePref import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.CustomizeAppIconPref import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.FocusModePref @@ -44,6 +46,7 @@ import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.MoreSe import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.RepostSettingsPref import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.ThemePref import com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs.UseInAppBrowserPref +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -64,13 +67,13 @@ fun PreferencesComposable( modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), topBar = { CenterAlignedTopAppBar(scrollBehavior = scrollBehavior, title = { - Text(text = stringResource(R.string.settings), fontWeight = FontWeight.Bold) + Text(text = stringResource(Res.string.settings), fontWeight = FontWeight.Bold) }, navigationIcon = { IconButton(onClick = { closePreferencesDrawer() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.close_outline), + imageVector = vectorResource(Res.drawable.close_outline), contentDescription = "" ) } @@ -101,7 +104,7 @@ fun PreferencesComposable( ThemePref() if (viewModel.appIcon == null) { - CustomizeAppIconPref(navController, closePreferencesDrawer, R.drawable.pixelix_logo) + CustomizeAppIconPref(navController, closePreferencesDrawer, Res.drawable.pixelix_logo) } else { CustomizeAppIconPref(navController, closePreferencesDrawer, viewModel.appIcon!!) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/ExpandOptionsPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/ExpandOptionsPref.kt index 655a4b8b..a17bc514 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/ExpandOptionsPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/ExpandOptionsPref.kt @@ -44,10 +44,11 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.utils.bottom import com.daniebeler.pfpixelix.utils.top +import org.jetbrains.compose.resources.DrawableResource @Composable fun ExpandOptionsPref( - @DrawableRes leadingIcon: Int, + leadingIcon: DrawableResource, title: String, desc: String? = null, initializeExpanded: Boolean = false, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SettingsPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SettingsPref.kt index d0bdf2b0..5475995d 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SettingsPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SettingsPref.kt @@ -31,6 +31,8 @@ import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp +import org.jetbrains.compose.resources.DrawableResource +import org.jetbrains.compose.resources.vectorResource //@Composable @@ -42,7 +44,7 @@ import androidx.compose.ui.unit.dp // contentAlignment = Alignment.Center // ) { // Image( -// painter = painterResource(id = R.drawable.ic_wavy_line), +// painter = painterResource(Res.drawable.ic_wavy_line), // contentDescription = null // ) // } @@ -53,7 +55,7 @@ fun SettingPref( leadingIcon: ImageBitmap, title: String, desc: String? = null, - @DrawableRes trailingContent: Int?, + trailingContent: DrawableResource?, onClick: () -> Unit = {}, shape: Shape = MaterialTheme.shapes.medium, textColor: Color? = null, @@ -67,7 +69,7 @@ fun SettingPref( trailingContent?.let { Box(modifier = Modifier.padding(end = 12.dp)) { Icon( - imageVector = ImageVector.vectorResource(trailingContent), + imageVector = vectorResource(trailingContent), contentDescription = null, ) } @@ -85,7 +87,7 @@ fun SettingPref( leadingIcon: Painter, title: String, desc: String? = null, - @DrawableRes trailingContent: Int?, + trailingContent: DrawableResource?, onClick: () -> Unit = {}, shape: Shape = MaterialTheme.shapes.medium, textColor: Color? = null, @@ -99,7 +101,7 @@ fun SettingPref( trailingContent?.let { Box(modifier = Modifier.padding(end = 12.dp)) { Icon( - imageVector = ImageVector.vectorResource(trailingContent), + imageVector = vectorResource(trailingContent), contentDescription = null, ) } @@ -114,10 +116,10 @@ fun SettingPref( @Composable fun SettingPref( - @DrawableRes leadingIcon: Int, + leadingIcon: DrawableResource, title: String, desc: String? = null, - @DrawableRes trailingContent: Int?, + trailingContent: DrawableResource?, onClick: () -> Unit = {}, shape: Shape = MaterialTheme.shapes.medium, textColor: Color? = null, @@ -131,7 +133,7 @@ fun SettingPref( trailingContent?.let { Box(modifier = Modifier.padding(end = 12.dp)) { Icon( - imageVector = ImageVector.vectorResource(trailingContent), + imageVector = vectorResource(trailingContent), contentDescription = null, ) } @@ -220,7 +222,7 @@ fun SettingPref( @Composable fun SettingPref( - @DrawableRes leadingIcon: Int, + leadingIcon: DrawableResource, title: String, desc: String? = null, trailingContent: @Composable () -> Unit = {}, @@ -234,12 +236,12 @@ fun SettingPref( Box(Modifier.padding(start = 14.dp)) { textColor?.let { Icon( - imageVector = ImageVector.vectorResource(leadingIcon), + imageVector = vectorResource(leadingIcon), contentDescription = title, tint = textColor ) } ?: Icon( - imageVector = ImageVector.vectorResource(leadingIcon), + imageVector = vectorResource(leadingIcon), contentDescription = title, ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SwitchPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SwitchPref.kt index 61ebf6db..ddb7c832 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SwitchPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/basic/SwitchPref.kt @@ -11,11 +11,12 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.utils.rememberPrefBoolState import com.daniebeler.pfpixelix.utils.rememberPrefIntState +import org.jetbrains.compose.resources.DrawableResource @Composable fun SwitchPref( key: String, - @DrawableRes leadingIcon: Int, + leadingIcon: DrawableResource, title: String, desc: String? = null, default: Boolean = false, @@ -44,7 +45,7 @@ fun SwitchPref( @Composable fun SwitchIntPref( key: String, - @DrawableRes leadingIcon: Int, + leadingIcon: DrawableResource, title: String, desc: String? = null, default: Int = SettingPrefUtil.OFF, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ClearCachePref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ClearCachePref.kt index bf5cc5fc..cb6b7932 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ClearCachePref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ClearCachePref.kt @@ -6,9 +6,10 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPref import java.text.CharacterIterator import java.text.StringCharacterIterator @@ -24,8 +25,8 @@ fun ClearCachePref() { } SettingPref( - leadingIcon = R.drawable.save_outline, - title = stringResource(id = R.string.clear_cache), + leadingIcon = Res.drawable.save_outline, + title = stringResource(Res.string.clear_cache), desc = cacheSize.value, trailingContent = null, onClick = {cacheSize.value = deleteCache(context)} diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/CustomizeAppIconPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/CustomizeAppIconPref.kt index 0768197e..67a2cc85 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/CustomizeAppIconPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/CustomizeAppIconPref.kt @@ -3,20 +3,22 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import androidx.annotation.DrawableRes import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.ImageBitmap -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.painterResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.navigation.NavController import androidx.navigation.compose.rememberNavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPref import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.DrawableResource @Composable -fun CustomizeAppIconPref(navController: NavController, closePreferenceDrawer: () -> Unit, @DrawableRes logo: Int) { +fun CustomizeAppIconPref(navController: NavController, closePreferenceDrawer: () -> Unit, logo: DrawableResource) { SettingPref(leadingIcon = painterResource(logo), - title = stringResource(id = R.string.customize_app_icon), - trailingContent = R.drawable.chevron_forward_outline, + title = stringResource(Res.string.customize_app_icon), + trailingContent = Res.drawable.chevron_forward_outline, onClick = { closePreferenceDrawer() Navigate.navigate("icon_selection_screen", navController) @@ -26,8 +28,8 @@ fun CustomizeAppIconPref(navController: NavController, closePreferenceDrawer: () @Composable fun CustomizeAppIconPref(navController: NavController, closePreferenceDrawer: () -> Unit, logo: ImageBitmap) { SettingPref(leadingIcon = logo, - title = stringResource(id = R.string.customize_app_icon), - trailingContent = R.drawable.chevron_forward_outline, + title = stringResource(Res.string.customize_app_icon), + trailingContent = Res.drawable.chevron_forward_outline, onClick = { closePreferenceDrawer() Navigate.navigate("icon_selection_screen", navController) @@ -37,5 +39,5 @@ fun CustomizeAppIconPref(navController: NavController, closePreferenceDrawer: () @Preview @Composable private fun CustomizeAppIconPrefPreview() { - CustomizeAppIconPref(rememberNavController(), {}, R.drawable.pixelix_logo) + CustomizeAppIconPref(rememberNavController(), {}, Res.drawable.pixelix_logo) } \ No newline at end of file diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/FocusModePref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/FocusModePref.kt index 314a80ad..ff367d5a 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/FocusModePref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/FocusModePref.kt @@ -3,9 +3,10 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPrefUtil import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SwitchIntPref @@ -26,8 +27,8 @@ fun FocusModePref() { SwitchIntPref( key = FocusModePrefUtil.KEY_FOCUS_MODE, - leadingIcon = R.drawable.square_outline, - title = stringResource(R.string.focus_mode), + leadingIcon = Res.drawable.square_outline, + title = stringResource(Res.string.focus_mode), default = SettingPrefUtil.OFF, onCheckedChange = { SettingPrefUtil.setValue(context, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideAltTextButtonPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideAltTextButtonPref.kt index 4df14f42..20c964c6 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideAltTextButtonPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideAltTextButtonPref.kt @@ -3,9 +3,10 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPrefUtil import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SwitchIntPref @@ -26,8 +27,8 @@ fun HideAltTextButtonPref() { SwitchIntPref( key = HideAltTextButtonPrefUtil.KEY_HIDE_ALT_TEXT_BUTTON, - leadingIcon = R.drawable.document_text_outline, - title = stringResource(R.string.hide_alt_text_button), + leadingIcon = Res.drawable.document_text_outline, + title = stringResource(Res.string.hide_alt_text_button), default = SettingPrefUtil.OFF, onCheckedChange = { SettingPrefUtil.setValue(context, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideSensitiveContentPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideSensitiveContentPref.kt index fbeb52e2..bfe0b52f 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideSensitiveContentPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/HideSensitiveContentPref.kt @@ -2,9 +2,10 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPrefUtil import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SwitchIntPref import com.daniebeler.pfpixelix.utils.KmpContext @@ -26,8 +27,8 @@ fun HideSensitiveContentPref() { SwitchIntPref( key = HideSensitiveContentPrefUtil.KEY_HIDE_SESITIVE_CONTENT, - leadingIcon = R.drawable.eye_off_outline, - title = stringResource(R.string.hide_sensitive_content), + leadingIcon = Res.drawable.eye_off_outline, + title = stringResource(Res.string.hide_sensitive_content), default = SettingPrefUtil.ON, onCheckedChange = { SettingPrefUtil.setValue(context, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/LogoutPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/LogoutPref.kt index 352e3a18..c0f2c685 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/LogoutPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/LogoutPref.kt @@ -10,10 +10,11 @@ import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview import com.daniebeler.pfpixelix.LoginActivity -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPref import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -26,8 +27,8 @@ fun LogoutPref(logout: () -> Unit) { LogoutAlert(showAlert, logout) SettingPref( - leadingIcon = R.drawable.log_out_outline, - title = stringResource(id = R.string.logout), + leadingIcon = Res.drawable.log_out_outline, + title = stringResource(Res.string.logout), trailingContent = null, onClick = { showAlert.value = true }, textColor = MaterialTheme.colorScheme.error @@ -45,9 +46,9 @@ fun LogoutAlert(show: MutableState, logout: () -> Unit) { val context = LocalContext.current if (show.value) { AlertDialog(title = { - Text(text = stringResource(R.string.logout_questionmark)) + Text(text = stringResource(Res.string.logout_questionmark)) }, text = { - Text(text = stringResource(R.string.are_you_sure_you_want_to_log_out)) + Text(text = stringResource(Res.string.are_you_sure_you_want_to_log_out)) }, onDismissRequest = { show.value = false }, confirmButton = { @@ -59,13 +60,13 @@ fun LogoutAlert(show: MutableState, logout: () -> Unit) { context.startActivity(intent) } }) { - Text(stringResource(R.string.logout)) + Text(stringResource(Res.string.logout)) } }, dismissButton = { TextButton(onClick = { show.value = false }) { - Text(stringResource(id = R.string.cancel)) + Text(stringResource(Res.string.cancel)) } }) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/MoreSettingsPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/MoreSettingsPref.kt index b550d090..414ee71b 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/MoreSettingsPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/MoreSettingsPref.kt @@ -1,17 +1,18 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import androidx.compose.runtime.Composable -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPref @Composable fun MoreSettingsPref(openUrl: () -> Unit) { SettingPref( - leadingIcon = R.drawable.settings_outline, - title = stringResource(id = R.string.more_settings), - trailingContent = R.drawable.open_outline, + leadingIcon = Res.drawable.settings_outline, + title = stringResource(Res.string.more_settings), + trailingContent = Res.drawable.open_outline, onClick = openUrl ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/RepostSettingsPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/RepostSettingsPref.kt index b4dd243f..973e3caf 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/RepostSettingsPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/RepostSettingsPref.kt @@ -1,18 +1,19 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import androidx.compose.runtime.Composable -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPref @Composable fun RepostSettingsPref(openUrl: () -> Unit) { SettingPref( - leadingIcon = R.drawable.sync_outline, - title = stringResource(id = R.string.repost_settings), - trailingContent = R.drawable.open_outline, + leadingIcon = Res.drawable.sync_outline, + title = stringResource(Res.string.repost_settings), + trailingContent = Res.drawable.open_outline, onClick = openUrl ) } diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ThemePref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ThemePref.kt index 9ef4299f..e75c61dc 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ThemePref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/ThemePref.kt @@ -9,9 +9,10 @@ import androidx.compose.material.icons.rounded.LightMode import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.ExpandOptionsPref import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.OptionShapes import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.ValueOption @@ -44,16 +45,16 @@ fun ThemePref() { } ExpandOptionsPref( - leadingIcon = R.drawable.color_palette_outline, - title = stringResource(R.string.app_theme), + leadingIcon = Res.drawable.color_palette_outline, + title = stringResource(Res.string.app_theme), ) { ValueOption( shape = OptionShapes.indexOfShape(0, 3), leadingIcon = imageVectorIconBlock( imageVector = Icons.Rounded.BrightnessAuto, - contentDescription = stringResource(R.string.theme_system) + contentDescription = stringResource(Res.string.theme_system) ), - title = stringResource(R.string.theme_system), + title = stringResource(Res.string.theme_system), trailingContent = radioButtonBlock(themeModeValue == FOLLOW_SYSTEM), value = FOLLOW_SYSTEM, onOptionClick = onOptionClick, @@ -62,9 +63,9 @@ fun ThemePref() { shape = OptionShapes.indexOfShape(1, 3), leadingIcon = imageVectorIconBlock( imageVector = Icons.Rounded.LightMode, - contentDescription = stringResource(R.string.theme_light) + contentDescription = stringResource(Res.string.theme_light) ), - title = stringResource(R.string.theme_light), + title = stringResource(Res.string.theme_light), trailingContent = radioButtonBlock(themeModeValue == LIGHT), value = LIGHT, onOptionClick = onOptionClick, @@ -73,9 +74,9 @@ fun ThemePref() { shape = OptionShapes.indexOfShape(2, 3), leadingIcon = imageVectorIconBlock( imageVector = Icons.Rounded.DarkMode, - contentDescription = stringResource(R.string.theme_dark) + contentDescription = stringResource(Res.string.theme_dark) ), - title = stringResource(R.string.theme_dark), + title = stringResource(Res.string.theme_dark), trailingContent = radioButtonBlock(themeModeValue == DARK), value = DARK, onOptionClick = onOptionClick, @@ -84,9 +85,9 @@ fun ThemePref() { shape = OptionShapes.indexOfShape(2, 3), leadingIcon = imageVectorIconBlock( imageVector = Icons.Rounded.Contrast, - contentDescription = stringResource(R.string.amoled) + contentDescription = stringResource(Res.string.amoled) ), - title = stringResource(R.string.amoled), + title = stringResource(Res.string.amoled), trailingContent = radioButtonBlock(themeModeValue == AMOLED), value = AMOLED, onOptionClick = onOptionClick, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/UseInAppBrowserPref.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/UseInAppBrowserPref.kt index 36eac71e..e1cd7722 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/UseInAppBrowserPref.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/settings/preferences/prefs/UseInAppBrowserPref.kt @@ -3,9 +3,10 @@ package com.daniebeler.pfpixelix.ui.composables.settings.preferences.prefs import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.tooling.preview.Preview -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SettingPrefUtil import com.daniebeler.pfpixelix.ui.composables.settings.preferences.basic.SwitchIntPref @@ -26,8 +27,8 @@ fun UseInAppBrowserPref() { SwitchIntPref( key = UseInAppBrowserPrefUtil.KEY_USE_IN_APP_BROWSER, - leadingIcon = R.drawable.browsers_outline, - title = stringResource(R.string.use_in_app_browser), + leadingIcon = Res.drawable.browsers_outline, + title = stringResource(Res.string.use_in_app_browser), default = SettingPrefUtil.ON, onCheckedChange = { SettingPrefUtil.setValue(context, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/single_post/SinglePostComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/single_post/SinglePostComposable.kt index 87833acd..a3d86912 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/single_post/SinglePostComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/single_post/SinglePostComposable.kt @@ -23,17 +23,19 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.post.PostComposable import com.daniebeler.pfpixelix.ui.composables.states.ErrorComposable import com.daniebeler.pfpixelix.ui.composables.states.LoadingComposable import com.daniebeler.pfpixelix.utils.Navigate +import org.jetbrains.compose.resources.vectorResource @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -61,11 +63,11 @@ fun SinglePostComposable( CenterAlignedTopAppBar(title = { Column (horizontalAlignment = Alignment.CenterHorizontally) { Text( - text = stringResource(id = R.string.post), fontWeight = FontWeight.Bold + text = stringResource(Res.string.post), fontWeight = FontWeight.Bold ) Text( text = stringResource( - id = R.string.by, (viewModel.postState.post?.account?.username ?: "") + Res.string.by, (viewModel.postState.post?.account?.username ?: "") ), fontSize = 12.sp, lineHeight = 6.sp ) } @@ -74,7 +76,7 @@ fun SinglePostComposable( navController.popBackStack() }) { Icon( - imageVector = ImageVector.vectorResource(R.drawable.chevron_back_outline), contentDescription = "" + imageVector = vectorResource(Res.drawable.chevron_back_outline), contentDescription = "" ) } }) diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/states/EndOfListComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/states/EndOfListComposable.kt index b4b0566c..b6818a4f 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/states/EndOfListComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/states/EndOfListComposable.kt @@ -8,9 +8,10 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.unit.dp -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* @Composable fun EndOfListComposable() { @@ -21,6 +22,6 @@ fun EndOfListComposable() { horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ) { - Text(text = stringResource(R.string.this_is_the_end)) + Text(text = stringResource(Res.string.this_is_the_end)) } } \ No newline at end of file diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_location/TextFieldLocationsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_location/TextFieldLocationsComposable.kt index 4c02ac7a..53a98f62 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_location/TextFieldLocationsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_location/TextFieldLocationsComposable.kt @@ -30,18 +30,19 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel import com.daniebeler.pfpixelix.domain.model.Place +import org.jetbrains.compose.resources.StringResource @Composable fun TextFieldLocationsComposable( submit: (id: String) -> Unit, submitPlace: (place: Place?) -> Unit, initialValue: Place?, - labelStringId: Int, + labelStringId: StringResource, submitButton: (@Composable () -> Unit)?, modifier: Modifier?, imeAction: ImeAction, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_mentions/TextFieldMentionsComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_mentions/TextFieldMentionsComposable.kt index 7a718a06..475ded52 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_mentions/TextFieldMentionsComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/textfield_mentions/TextFieldMentionsComposable.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.TextRange import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction @@ -33,17 +33,19 @@ import androidx.compose.ui.text.input.getTextAfterSelection import androidx.compose.ui.text.input.getTextBeforeSelection import androidx.compose.ui.unit.dp import com.daniebeler.pfpixelix.di.injectViewModel -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import org.jetbrains.compose.resources.StringResource @Composable fun TextFieldMentionsComposable( submit: (text: String) -> Unit, text: TextFieldValue, changeText: (newText: TextFieldValue) -> Unit, - labelStringId: Int, + labelStringId: StringResource, submitButton: (@Composable () -> Unit)?, modifier: Modifier?, imeAction: ImeAction, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/hashtag_timeline/HashtagTimelineComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/hashtag_timeline/HashtagTimelineComposable.kt index a2897b54..12673256 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/hashtag_timeline/HashtagTimelineComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/hashtag_timeline/HashtagTimelineComposable.kt @@ -30,14 +30,15 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.nestedScroll -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.FollowButton import com.daniebeler.pfpixelix.ui.composables.InfinitePostsList import com.daniebeler.pfpixelix.ui.composables.states.EmptyState @@ -80,7 +81,7 @@ fun HashtagTimelineComposable( text = String.format( Locale.GERMANY, "%,d", viewModel.hashtagState.hashtag!!.count ) + " " + stringResource( - R.string.posts + Res.string.posts ), fontSize = 14.sp, lineHeight = 12.sp, diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/home_timeline/HomeTimelineComposable.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/home_timeline/HomeTimelineComposable.kt index 38f6dbee..4ce98130 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/home_timeline/HomeTimelineComposable.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/ui/composables/timelines/home_timeline/HomeTimelineComposable.kt @@ -6,10 +6,11 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.PhotoLibrary import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource +import org.jetbrains.compose.resources.stringResource import com.daniebeler.pfpixelix.di.injectViewModel import androidx.navigation.NavController -import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.ui.composables.InfinitePostsList import com.daniebeler.pfpixelix.ui.composables.states.EmptyState import com.daniebeler.pfpixelix.utils.Navigate @@ -27,9 +28,9 @@ fun HomeTimelineComposable( endReached = false, navController = navController, emptyMessage = EmptyState(icon = Icons.Outlined.PhotoLibrary, - heading = stringResource(R.string.no_posts), - message = stringResource(R.string.follow_accounts_or_hashtags_to_fill_your_home_timeline), - buttonText = stringResource(id = R.string.explore_trending_profiles), + heading = stringResource(Res.string.no_posts), + message = stringResource(Res.string.follow_accounts_or_hashtags_to_fill_your_home_timeline), + buttonText = stringResource(Res.string.explore_trending_profiles), onClick = { Navigate.navigate("trending_screen/accounts", navController) }), diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/latest_image/LatestImageWidget.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/latest_image/LatestImageWidget.kt index cde82ef1..e8ba484a 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/latest_image/LatestImageWidget.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/latest_image/LatestImageWidget.kt @@ -34,6 +34,8 @@ import androidx.glance.text.Text import androidx.glance.text.TextStyle import com.daniebeler.pfpixelix.MainActivity import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.widget.WidgetColors import com.daniebeler.pfpixelix.widget.latest_image.utils.GetImageProvider import com.daniebeler.pfpixelix.widget.notifications.models.LatestImageStore diff --git a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/notifications/NotificationsWidget.kt b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/notifications/NotificationsWidget.kt index f0d9add9..75d508cf 100644 --- a/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/notifications/NotificationsWidget.kt +++ b/app/src/androidMain/kotlin/com/daniebeler/pfpixelix/widget/notifications/NotificationsWidget.kt @@ -44,6 +44,8 @@ import androidx.glance.text.Text import androidx.glance.text.TextStyle import com.daniebeler.pfpixelix.MainActivity import com.daniebeler.pfpixelix.R +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.* import com.daniebeler.pfpixelix.widget.WidgetColors import com.daniebeler.pfpixelix.widget.latest_image.utils.GetImageProvider import com.daniebeler.pfpixelix.widget.notifications.models.NotificationStoreItem @@ -196,7 +198,11 @@ class NotificationsWidget : GlanceAppWidget() { Spacer(GlanceModifier.height(12.dp)) Row(verticalAlignment = Alignment.Vertical.CenterVertically) { Image( - provider = GetImageProvider()(notification.accountAvatarUri, context, 1000f), + provider = GetImageProvider()( + notification.accountAvatarUri, + context, + 1000f + ), contentDescription = "", modifier = GlanceModifier.height(34.dp).width(34.dp).cornerRadius(34.dp) ) @@ -214,9 +220,7 @@ class NotificationsWidget : GlanceAppWidget() { } Text( text = LocalContext.current.getString( - getNotificationText( - notification.type - ) + getNotificationText(notification.type) ), style = TextStyle( color = GlanceTheme.colors.onBackground, fontSize = if (size.width >= BIG_SQUARE.width) { @@ -244,10 +248,7 @@ class NotificationsWidget : GlanceAppWidget() { "follow" -> R.string.followed_you "direct" -> R.string.sent_a_dm "reblog" -> R.string.reblogged_your_post - - else -> { - R.string.notifications - } + else -> R.string.notifications } } } diff --git a/app/src/androidMain/res/drawable/hash.xml b/app/src/androidMain/res/drawable/hash.xml deleted file mode 100644 index 1465fa3e..00000000 --- a/app/src/androidMain/res/drawable/hash.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/androidMain/res/values/strings.xml b/app/src/androidMain/res/values/strings.xml index 4d9b6eef..24b9ac3a 100644 --- a/app/src/androidMain/res/values/strings.xml +++ b/app/src/androidMain/res/values/strings.xml @@ -1,219 +1,12 @@ + Pixelix Notifications - Settings - Liked Posts - Bookmarked Posts - Followed Hashtags - Blocked Profiles - Muted Profiles - Logout - Open in browser - Share this profile - Block this profile - Unblock this profile - Mute this profile - Unmute this profile - Load More - Follow - Unfollow - Followers - Following - Posts - Hashtags - reblogged your post liked your post - followed you - Share this post - Trending - Profiles - Rules - Instance version - Terms of use - Privacy Policy - Admin - Users - Stats - unblock - Unblock - Unblock Profile? - Confirm to unblock this profile - no blocked profiles - Cancel - Post by - Liked by - Delete this post - Delete post? - This action cannot be undone - Delete - This is the End! - and - Followed by - other - others - yearly - monthly - daily - I don\'t have a profile - Server URL - Are you sure you want to log out? - Logout? - View %1$s comments - Leave a comment - No comments yet - No likes yet - no liked posts - Local - Global - Home - %1$s likes - Search - Unmute - unmute - Media Description - No posts yet - mentioned you - No bookmarked posts - Nothing to show - New post - Publish - Alt Text - caption - Sensitive/NSFW Media - content warning or spoiler text - Audience - unlisted - followers only - public - No followed hashtags - No muted profiles - Visibility: %1$s - Clear cache - Preferences - Hide sensitive content - About %1$s - More settings - Use in-app-browser - No trending profiles - No trending Hashtags - No trending posts - Upload your first post - The profiles you follow will appear here - Explore trending profiles - Nobody follows you yet - Empty - Follow profiles or hashtags to fill your home timeline - No posts - The Home timeline shows you posts from people and hashtags that you follow - The Local timeline shows posts from all users in your server - The Global timeline shows posts from all users in all servers your server federates with - This user has not postet anything yet - You don\'t have any notifications - view more - Edit Profile - Save - Delete reply - Reply - Post - Pixelfed is a photo and image sharing network on the Fediverse with a photo-oriented interface that includes albums, filters, moments etc. - Mastodon is a free and open source microblogging platform - PeerTube is a tool for sharing online videos developed by Framasoft, a french non-profit. - Lemmy is a selfhosted social link aggregation and discussion platform. It is completely free and open, and not controlled by any company. This means that there is no advertising, tracking, or secret algorithms. Content is organized into communities, so it is easy to subscribe to topics that you are interested in, and ignore others. Voting is used to bring the most interesting items to the top. - Threads is an app from Meta where you can view and share public conversations. You can also post threads, reply to others and follow profiles you are interested in. - More information - What makes a post trend? - Posts trend if they were posted during the selected timeframe and have many likes. - The trending profiles section lists the profiles on your instance with the most followers. The profiles you already follow are hidden. - What makes an profile trend? - What makes a hashtag trend? - Hashtags trend if many people have used them recently. - Private profile - • You won’t see the user in your home feed - • You won’t see other people boosting the user - • You won’t see other people mentioning the user - • You won’t see the user in public timelines - The user has no way of knowing they have been muted. - • You won’t see the user in your home feed - • You won’t see other people boosting the user - • You won’t see other people mentioning the user - • You won’t see the user in public timelines - • You won’t see notifications from that user - • The user is forced to unfollow you - • The user cannot follow you - • The user won’t see other people’s boosts of you - • The user won’t see you in public timelines - If you and the blocked user are on the same server, the blocked user will not be able to view your posts on your profile while logged in. - Block - Block profile? - Unmute Profile? - Mute - Mute Profile? - sent a dm - system - dark - light - App theme - Send message - Select recipient - New Direct Message - Warning - "Direct messages on Pixelfed are not end-to-end encrypted. Use caution when sharing sensitive data. " - Confirm - This is the beginning of your chat with this user. Don\'t forget to be respectful. - Rate us - About Pixelix - Developed by - Conversations - Share this collection - By %1$s - New Collection - Creating collections is not yet supported in the pixelfed api, but a new collection can be created in the pixelfed web app: - New - Collections - Follows you - muted - blocked - Message - All - Likes - Reposts - Edit this post - Stay updated with your latest notifications from Pixelfed right on your home screen - Customize app icon - Change app icon? - It may take a while until the new icon is shown. - Change mentioned you + sent a dm + reblogged your post + followed you have a look at the newest post from your home timeline, right on your homescreen - If an icon other than the default icon is selected, two icons will be displayed in your apps drawer. - Current Profile: - Other Profiles: - Add Pixelfed profile - Download image - Profile - Inbox - Are you sure you want to remove this Profile? - Remove Profile? - Remove - Are you sure, you want to update this post? - Mutual followers - License: %1$s - Hide Alt-text button - Instances: - Total posts: - Total users: - Active users: - %1$s version %2$s - Visit %1$s - Displayname - Bio - Website - Location - Mentions - Explore - reblogged by %1$s - Focus Mode - Hides description, likes and buttons from posts. - Repost settings - AMOLED - + Stay updated with your latest notifications from Pixelfed right on your home screen + \ No newline at end of file diff --git a/app/src/androidMain/res/drawable/add_circle.xml b/app/src/commonMain/composeResources/drawable/add_circle.xml similarity index 89% rename from app/src/androidMain/res/drawable/add_circle.xml rename to app/src/commonMain/composeResources/drawable/add_circle.xml index bb6edec0..92b53a6d 100644 --- a/app/src/androidMain/res/drawable/add_circle.xml +++ b/app/src/commonMain/composeResources/drawable/add_circle.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/add_circle_outline.xml b/app/src/commonMain/composeResources/drawable/add_circle_outline.xml similarity index 84% rename from app/src/androidMain/res/drawable/add_circle_outline.xml rename to app/src/commonMain/composeResources/drawable/add_circle_outline.xml index 84838b5e..c738aa64 100644 --- a/app/src/androidMain/res/drawable/add_circle_outline.xml +++ b/app/src/commonMain/composeResources/drawable/add_circle_outline.xml @@ -7,12 +7,12 @@ android:pathData="M448,256c0,-106 -86,-192 -192,-192S64,150 64,256s86,192 192,192 192,-86 192,-192z" android:strokeWidth="32" android:fillColor="#00000000" - android:strokeColor="?attr/colorOnBackground"/> + android:strokeColor="#000000"/> diff --git a/app/src/androidMain/res/drawable/add_outline.xml b/app/src/commonMain/composeResources/drawable/add_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/add_outline.xml rename to app/src/commonMain/composeResources/drawable/add_outline.xml index f6206722..203e50e3 100644 --- a/app/src/androidMain/res/drawable/add_outline.xml +++ b/app/src/commonMain/composeResources/drawable/add_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M256,112v288M400,256H112" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/bookmark.xml b/app/src/commonMain/composeResources/drawable/bookmark.xml similarity index 88% rename from app/src/androidMain/res/drawable/bookmark.xml rename to app/src/commonMain/composeResources/drawable/bookmark.xml index 3412f89e..cb4a89fd 100644 --- a/app/src/androidMain/res/drawable/bookmark.xml +++ b/app/src/commonMain/composeResources/drawable/bookmark.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/bookmark_outline.xml b/app/src/commonMain/composeResources/drawable/bookmark_outline.xml similarity index 89% rename from app/src/androidMain/res/drawable/bookmark_outline.xml rename to app/src/commonMain/composeResources/drawable/bookmark_outline.xml index 9d3f8aaa..c1c53891 100644 --- a/app/src/androidMain/res/drawable/bookmark_outline.xml +++ b/app/src/commonMain/composeResources/drawable/bookmark_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M352,48H160a48,48 0,0 0,-48 48v368l144,-128 144,128V96a48,48 0,0 0,-48 -48z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/bookmarks_outline.xml b/app/src/commonMain/composeResources/drawable/bookmarks_outline.xml similarity index 85% rename from app/src/androidMain/res/drawable/bookmarks_outline.xml rename to app/src/commonMain/composeResources/drawable/bookmarks_outline.xml index 4397938f..178e3102 100644 --- a/app/src/androidMain/res/drawable/bookmarks_outline.xml +++ b/app/src/commonMain/composeResources/drawable/bookmarks_outline.xml @@ -8,14 +8,14 @@ android:fillColor="#00000000" android:pathData="M128,80V64a48.14,48.14 0,0 1,48 -48h224a48.14,48.14 0,0 1,48 48v368l-80,-64" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/browsers_outline.xml b/app/src/commonMain/composeResources/drawable/browsers_outline.xml similarity index 85% rename from app/src/androidMain/res/drawable/browsers_outline.xml rename to app/src/commonMain/composeResources/drawable/browsers_outline.xml index f8af0a4e..5297cdbc 100644 --- a/app/src/androidMain/res/drawable/browsers_outline.xml +++ b/app/src/commonMain/composeResources/drawable/browsers_outline.xml @@ -8,11 +8,11 @@ android:fillColor="#00000000" android:pathData="M96,64L416,64A48,48 0,0 1,464 112L464,400A48,48 0,0 1,416 448L96,448A48,48 0,0 1,48 400L48,112A48,48 0,0 1,96 64z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/chatbubble_outline.xml b/app/src/commonMain/composeResources/drawable/chatbubble_outline.xml similarity index 93% rename from app/src/androidMain/res/drawable/chatbubble_outline.xml rename to app/src/commonMain/composeResources/drawable/chatbubble_outline.xml index f8e9097c..c69e17f1 100644 --- a/app/src/androidMain/res/drawable/chatbubble_outline.xml +++ b/app/src/commonMain/composeResources/drawable/chatbubble_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M87.49,380c1.19,-4.38 -1.44,-10.47 -3.95,-14.86a44.86,44.86 0,0 0,-2.54 -3.8,199.81 199.81,0 0,1 -33,-110C47.65,139.09 140.73,48 255.83,48 356.21,48 440,117.54 459.58,209.85a199,199 0,0 1,4.42 41.64c0,112.41 -89.49,204.93 -204.59,204.93 -18.3,0 -43,-4.6 -56.47,-8.37s-26.92,-8.77 -30.39,-10.11a31.09,31.09 0,0 0,-11.12 -2.07,30.71 30.71,0 0,0 -12.09,2.43l-67.83,24.48a16,16 0,0 1,-4.67 1.22,9.6 9.6,0 0,1 -9.57,-9.74 15.85,15.85 0,0 1,0.6 -3.29z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" /> diff --git a/app/src/androidMain/res/drawable/chevron_back_outline.xml b/app/src/commonMain/composeResources/drawable/chevron_back_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/chevron_back_outline.xml rename to app/src/commonMain/composeResources/drawable/chevron_back_outline.xml index 90c02788..989a61d8 100644 --- a/app/src/androidMain/res/drawable/chevron_back_outline.xml +++ b/app/src/commonMain/composeResources/drawable/chevron_back_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M328,112L184,256l144,144" android:strokeWidth="48" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/chevron_forward_outline.xml b/app/src/commonMain/composeResources/drawable/chevron_forward_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/chevron_forward_outline.xml rename to app/src/commonMain/composeResources/drawable/chevron_forward_outline.xml index 5777fede..9d13e502 100644 --- a/app/src/androidMain/res/drawable/chevron_forward_outline.xml +++ b/app/src/commonMain/composeResources/drawable/chevron_forward_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M184,112l144,144 -144,144" android:strokeWidth="48" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/chevron_up_outline.xml b/app/src/commonMain/composeResources/drawable/chevron_up_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/chevron_up_outline.xml rename to app/src/commonMain/composeResources/drawable/chevron_up_outline.xml index d93040a5..f0fa5bce 100644 --- a/app/src/androidMain/res/drawable/chevron_up_outline.xml +++ b/app/src/commonMain/composeResources/drawable/chevron_up_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M112,328l144,-144 144,144" android:strokeWidth="48" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/close_outline.xml b/app/src/commonMain/composeResources/drawable/close_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/close_outline.xml rename to app/src/commonMain/composeResources/drawable/close_outline.xml index 18902090..8120713a 100644 --- a/app/src/androidMain/res/drawable/close_outline.xml +++ b/app/src/commonMain/composeResources/drawable/close_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M368,368L144,144M368,144L144,368" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/cloud_download_outline.xml b/app/src/commonMain/composeResources/drawable/cloud_download_outline.xml similarity index 91% rename from app/src/androidMain/res/drawable/cloud_download_outline.xml rename to app/src/commonMain/composeResources/drawable/cloud_download_outline.xml index 259c05c9..b403a084 100644 --- a/app/src/androidMain/res/drawable/cloud_download_outline.xml +++ b/app/src/commonMain/composeResources/drawable/cloud_download_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M320,336h76c55,0 100,-21.21 100,-75.6s-53,-73.47 -96,-75.6C391.11,99.74 329,48 256,48c-69,0 -113.44,45.79 -128,91.2 -60,5.7 -112,35.88 -112,98.4S70,336 136,336h56M192,400.1l64,63.9 64,-63.9M256,224v224.03" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/code_slash_outline.xml b/app/src/commonMain/composeResources/drawable/code_slash_outline.xml similarity index 89% rename from app/src/androidMain/res/drawable/code_slash_outline.xml rename to app/src/commonMain/composeResources/drawable/code_slash_outline.xml index 2878bc5e..253b9081 100644 --- a/app/src/androidMain/res/drawable/code_slash_outline.xml +++ b/app/src/commonMain/composeResources/drawable/code_slash_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M160,368L32,256l128,-112M352,368l128,-112 -128,-112M304,96l-96,320" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/color_palette_outline.xml b/app/src/commonMain/composeResources/drawable/color_palette_outline.xml similarity index 77% rename from app/src/androidMain/res/drawable/color_palette_outline.xml rename to app/src/commonMain/composeResources/drawable/color_palette_outline.xml index ae3cd225..cfd24c15 100644 --- a/app/src/androidMain/res/drawable/color_palette_outline.xml +++ b/app/src/commonMain/composeResources/drawable/color_palette_outline.xml @@ -8,26 +8,26 @@ android:fillColor="#00000000" android:pathData="M430.11,347.9c-6.6,-6.1 -16.3,-7.6 -24.6,-9 -11.5,-1.9 -15.9,-4 -22.6,-10 -14.3,-12.7 -14.3,-31.1 0,-43.8l30.3,-26.9c46.4,-41 46.4,-108.2 0,-149.2 -34.2,-30.1 -80.1,-45 -127.8,-45 -55.7,0 -113.9,20.3 -158.8,60.1 -83.5,73.8 -83.5,194.7 0,268.5 41.5,36.7 97.5,55 152.9,55.4h1.7c55.4,0 110,-17.9 148.8,-52.4 14.4,-12.7 11.99,-36.6 0.1,-47.7z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> diff --git a/app/src/commonMain/composeResources/drawable/default_avatar.png b/app/src/commonMain/composeResources/drawable/default_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..8c04dd2662eeddd362eb24aa2a95d46a2c298344 GIT binary patch literal 14936 zcmX|obyOTru=Ok~?gZDxg1h^oSzNQY1PB`3eSr`NuE8Zpa0?LJ0s%rGxCHm$1b2A+ z-uKS8=giJuQ(e`4r@N}|osXL8uW&FaFaZF-QG&^9Ki>!cyUyXpO7b$gKBk9(z6mCJzJI+)Ex}$9RHkNg*E!E-xlh-;!pImvmIgz<NBYoC>Wx=0#X$E@fuNE}C zGxxpojqJ1zUT9)19bC|qKa|vgu100Lci!~dW=3^-9;a6I$ME5vq`Bi6`{IbZJ3Sgh zbW1jSY!igM<~L)SC$+?R=V;!vkAs&5kt;7RXb2sSU$6!`9L~R9aZZ+MR1vz2z_Zv`Q#oFYhO1s`MgR%5q zTTPhD6duYA6Wf%v?&qHd`gQ9&-^o)4Ly=%D z5|;$LsO3{%!v&Ob_(&K|zcyZK%v774?W*tA&y1pg5|oQuSEBA`Cn2RJBQ|X*w1n)z z?Oum_U3O`>g7filsIV5}&aup8@wTIR#geYMt5q5yuhW@EhuO!KOHF)>^S41<^HrZV!tPN*)*j(eYI&Z0H-D;$9A zZlpZT!47*L9v-MuzbAQmX(#dK4GeA7X+-iiZRr@bO@*@BdQfy{QzIuNtj;XgIW5gE zEQH@0N>k*JS1lX=8tCumsx~-FqyH*A8?{jIbrKswS43N{vwbD>PX8?VTYBhw^#)0( zBKrm{k44wi(ffDp!6md%7(0WTTyXHpQtV{)weSK3Bz0&mtuh^tNaF+io69W{<5;u3 z+tuwwpm2j5YSO%u3c{Q;k9GPnBGP!i`u(pOvl3CLEW=Y`Qr+?M&$(?W))DP_9>0z% z@3NO@2()7*?Ecs;B{=K!+`q-$Zo0OrDXRkb49UBGMm`u{zVXz?F+mJxa9TQ>uB<%W zcxCi_1O2y98S2CB#d#~SXk?b}rL|m8E&`wIU$e8mLNY;ag!N%TI0#d&PE?nE}qC3ebAl~mobOW0tdXk>9!z3V*|vwoo%iIG zsOPA@qwW5AYDWhhJG^_ztZpjE!{b8#i|lLr0v|%+>3*EJBU(M^mAv9t?EL9tB=mdD z9M|d0pFe++WAL<{Mi7GXmX{Si0&91jY^0CQ#ZBIwnA?1w5y)V<0As7YCZTt8E=9!d zON0n>%6B7~&fa1ovZ%*6jD1s6y7};%J^YZ>d5r2PVn5N1k{*K>A8=|v9&2ct{EZUFMq+p&)yKLR4xp!!oZ#CQLi zb~g?J$lqLlr|undA4H1SZiwWDFH+Z`|CL>$DOK7lM9(AO-~F->GXiT2XkFzl$2ia@M-dV zpNEUttyDeJ#KKqcs6dZT>CARr;Nf<4$ner4!9o>~B>Q$0qme-gFlfZ%K{LaTR}1j6&*G z-^Ujr?-4}+^7^q(iTViH4{#*A%pSerP{cScC{zz3379rVoLm{$duU$$Wm3i1Gn`G$`beX+yGg5*Ez#9(5t$0W41#FM zQli*zSk_GC|G8~TkC2`XV4uESb3cPIQ*h}_lCKs^6LCtxr$_4-SvletUlQiPxtfjQQQp- zL{xBqR+VY^k{xzPG4SWrgXC9IgKYDl11mhsdX@Tg&#+ft1#LuVGw627&eoCGzH0<$ z&|GO5?YDTC=RcA9PPXFz2OdNrgOE4~qFE2M)uZp;=^ssGc!gvR4P7Pgryul?3Ty6{ zGO6;_$TZ4Z`LIHJp7ue4k&cXJ0}T5uafU5=-2OI12Cp|a(c5qBpHl|@H!UJu<)MDHZ)YB&DKC+Jw(F>28E>ur6{CAsx?1adC+6w z-;)=UJ;TPuU(RaI8OPX;H!hQ37I8xdaUheg&hB*>?(~rw{D;K+dAy+9(t*IB)aJ_%4Xc}}=dVf3H^=a1B-|=N*Hrodh7WRTs-l~g<5VZUOWk`#?V}1l`B>C1032=Y+uK`VN4D|{k%f$b4Uca*XBo#lR&a4~-?bJb{82#^8O7eRBkFmd>@GTmKPlWq~w6 z@+0^^YZ@5%2iGlL=H`}55({Kdw&}d4(eMm0Xo3n#8`3g47j^J z8HYnx^H0n&mITIpx*d#uc`m&+KA zVweF6Fm|uj&2fusA zF*n;ogeg2*DjGP_m0AE=Z*2t;!V&}>X22P!%<5F6MdiNlUiv-?F(Ye9i2VK`DN^Yynz5su|y2&WOMj!8`dCS-CT96mu<-!jUC46Zf-kfnKs z$??|yz&$|1O`|uBUqJHgvwlcoEfHdfpvbRsQRf#`iL++GoXJsJoe~?a+DE3d%S!y) zNp*o?VPTf@*E*mg?XsYWsKxTvGnsBCp%9ix0WTO~0GUb2-dJYP-^ucRY{QlrEVH2k zDGo7os%nFJvF0GUXq@lfe|@qt0sOkl-_OoTSI3$8o8RKbe_9&Nzu?9u?BAfOpanv^ z^Y>fmVdu9CcNqUAK$+t$Mlo8nBqU&5y=n>RdeUetIFaVWIj8bo5p{i)8rO6j&ugaV z+U;SitJxDv+?xf5ASq7?6fWUFqEyKhMIB^%ML8z0o%AE5eYF)o6p z)dnaDvx3px=WXM=^`-x2*N4f`ehm;nFzNJ^*C-_P&(UJIdhnp!l;r^iznw^m+|{&D?=#f_inCMN{zT~bU0c^ zR+P5}2@2i674MOkF zOQdnU&@2jk3kHsA{YLC z2ZeU8y(eG%=6JSN8q$Yk)u8<#BGl;se&;EAO#T<-6yw}2!kzX@22qH9uG1 z;r#Z`SNFGv^Nli}xbcFaSq&%m4z*g_-*%PLhxaBL{I+Ll|H|gxEYB}+HJkrp-hZxH zwH5H+HY%>d(=7E?57g8?D+8~i02zBF=3oKTnW4ry8~+v54`M**)C-!uL%+^N_qafp z)u)@1;b9cb`Ntn2-L%0(=n6%CJu||UN;nB#(q&dhP?wnCbm#D%u+?-TvhBI6kf|i~ zM_cTIR0qq^%g$8(-})2)cmUk;_j=;nKS%sL8Bynhl9fDxhYC_EEoh_Q*|*Q1dwiMm z<;(R8Q};+?2GIo9zsa@u%RP@YipGcreBbdEKW|Kw`d^!l*8bA%CDeEF_@tkCkLNkH zhAYbSwXms#an%Bq**{kfk~W#tZpj6SCjzYTuk%RR|J-}e4{z$m{c>iJ@qzJ2hB`LR zkrg{O|16^ne_hC13$OO%Sh&-4uBtR@;+kVeGMpqSdNZoPt}N@qdj`_d$SctO(tJg% zboPA=#Ym_WU`-oX;p%^+jjcV@R>%0x!p)4@e}l!{KE}25u9=pi-ge8d_s=pOH^`(b zDA0w1;kEGmQxX-`lwo(L$7j;s``}1R6ZmDeeOh z4bvgm^XK0;KpHR~Pkz*6q|KYZd3p?Weppq3vX61{eCJM!okV6ZKgL4&m|%L1;?;AdB&Q$8)pa-xG2D?S02nsf4A_wiw7rE?kMBaz;O`WxOP|Z{oRHwLY)>Xuk1A(X`pk~ zG=%cWKqmNO621}}e9W7{Y^Ba|$B-5>7_n0M-?$qTb(Qz0E|6sogJceps{FPwHOWsgL5RGHg&Dedj;cyjt?R#? zVPkl-&G|_t8veO~ys@WF8W|b6hn2bZVMo+$x{?vFb&d05f)b{$->y}d`8c^1c#r(f zF)9Z^6$knsJLx-X0n#9exqt_eh(Y0%`ZT3_BKWCc$pAF4a z?c-e*@?S;${9KJzVG1;3SNt$S+2t}IWI2Dg=@obwu|Oe&{t~rsl|b6( z#lWP*!}+8i6N*&bb2RRCF7x6VBLfoV!znK_6LY8g$CgKt66UAm^U8GD(hON2YN0f& z4fY6R$l7NY07dHjC#{%A>DXoC5UCi{g^NT-l?Og7xB4NZD%F1n`&aK93RXWXR-^%&+DtT=xFf2Nj6V+TUpFlVa|lbKXV9OSZfa*0YJ%USR+ zl2EC%fI50K)ndNK*X)-ap0Qu6Xw*^BUlQkXGzXjrds;ndhA2j)r1sQznh8MBagPN5 znuHH7hoh;qF-t0km)Q&(fRbiDd_;;QxD%X%Ttz2(3k^Z4g1N~d2^8&x_9I1wj2lEJPc>7Pou#!`<5W{#P1Tzf1R68!v3`b6Zr&Bh}})d8<>qr=&Fap zGT#pXZt7jc?SW|a4%6JD=ZV}Aonqg#Uv-ez5d{Ij*F$kY@zb^gT`iNPqwW z&*jN!!CPW_d&=oH5KoKe)kZDur5bee%M3Nb@GLjsk73e2tWDNl^GKc;E8iTSBpPe6 z{W-Pm(JJKb@L+6aV8jWW$ACDQB{4+~A^|WyBfc$A0o9Fx2s_q|0c7|&lj9F;_LP7| zeZp6mtqFlU&`ywe^t%67bdqH8{}!>l#a@PzV`ReiSx@hD;xV_r^CWMnNism#yycw>Z$<|~Qwfq7+ue(?5=7WSUCD?e41e^=k4=&Rg>V*V1GMlP zz>~Cs0z)cp7DMPa>!T%l_9>XRa~phZz)Aqmzo82u>Up3|fLzBu$z^`{J9V>Qw6@vT97*VW^C1f18h9n&%?c#VE?2Td}nBLsLjAoylR%}f9%|AhQYG`DY zHa*v}A1TxaZL#&|RmHGhUD7)aHF{f1*jLvEV*zVOJx&*QW`hw>_R?;U@(J6Ekw*N| zJ|QZUMZ5^}swufyi#~IiK&{WAWAY`8T|*~0g*o!#))EYPj;}q;e`I69Rtg&6M}&nR zt(*K?a$MdrPGCzyDDs2=2p4_jVkaBboZQ{u9Qsm?(tuGOj<|LOuZ)E^yeE3IN<_ns zK&D}LDt2Uo-k;n(%h@)$TL+~viiW*BQ3+70r)5<7QEn5UWy*2*zyT1j<8dHx zbSR>2x0>mMB?wR^kX8|Qq&bUap_jAjE@SJB_n{Q%ZUhQ=SW^&G*5Px z5RzqZM41|zY*5-=Yi(i0(Aq9Z9Lw2n9V}eH;2u-DwXz!Pa}S)1kyN?s`Lys`x`7TS zgRq20L@%0+c#5quyH*LG8Kl|GvuHn*nkH!d*8DK=IZ2Qt?`tgNQ52&$ckfE(cCB`%-BdhED zTb}zdsxS{80k0m3&Z3ZYc|K!AVxL2OvU7H&TlHR4Ae&W(V@&)8cN_cN<>uF#9FdmoD$~yKKN9Vs z?~XAxdpjioqi}pUWnpN`C6*c@$r$0lH9E^1CrK|AyD@QbF)pE%G(2V;$!jn-iLLse z*9v0PY^(J}50)!vju0Gp-Hjv36}f2Bh$GFP{3AQgZX;9m*i>}2oPo>yM0j3i2wj&A zV2p`F;}9&_*HS&G5T%$@7^nX|HUljp-;sK_e{=|prQq(`XH_yApfxoSfcmK7N1}3* z0!T`-+@zyOUa?oDug7y(gz?MDc#f`(mA-eiP|u{Yc#N)-10cu%+<=jKJ%YJTL!F*Q ztWCsLH5;5;mUnz$Sd?0Q4|Yf$flx2Z&6h`R3qgT-*3U6@JaRwfw4;P5372LLEg|I-4r zuwgM_lIPKI!HDOX6F98;Scr#HMdk_Qv&};%Qq{pIL4`C3qzNP^qkG(|#RceIOUCd! z{&OgkN`@iq4|pPb)CJo|KGuClQpK?oB$jTA)jteG8UG)>E;1c*G4xcOpSZM{de`S zPDr3E6yV|6TSMtxsW$oC;vm|SLa3R?Lf2gLR;XGFvp>XpvHNB2Mq&kUQu!B4oTKi9 z)vx|VXS|rOvQesug(9dg(9HczQHe({d}4X_mcnN4D#hwK$rkT*$Uk|m86p&{+~FS_ znyx$vsF3=m&rWdC(=Q{qw*!e;;|5cBWUwYx1Pf0+ULeDiX#0)+Wu<{z>WKQq0;buO zncT_QsgS*lKIFUYdpH(tK0xX>h9+S%>0-DDEsshxsCwHd_HnC^`R@sXYTYM8`O7BC zFq^}8Jp8=t$fAhZ=J0{pgpZ{{azHGM@IdU-B6d2@3^bvT3Qp~V4M8$Mx*s9g4mG3b|>l2 z1ufk!8%Xb7SRx`~XG_Ny!YBWHwz%=@Cnd zN(c>dZS$E%E>k}HM|2vPjU)pJJW!5d9qJd-K^Nmb_7>|48tk9{GyM=kr}9zOeC)$V zWhU1R@_Eb=V}|m8&J^>!`yGkS0ldq3cZmjX>kgB_Ut;VoT&v<@6viErBbYfKZq~^< zY!SAEjO777vp@JlE#vOKXp=v!zz>Ki?8VEBvm~-BBj1_w;6Xu3A=4x@%)y>2d=W4RIj}m#^{Lt$Q0hrmT zI8m+#k`(RHM#)4)+RxU>v3-EDWm|>LQk?SSA;G%f`)iDh^mOcWOlfmA9`X)Vb00l! zX7`potS}FsPmqvXg{GRe*0$vW0grQ&?@0F z+fY>CtN&lztEC%Yw^nk`iE&ZTyhYif7L0m`b^oO=(k-i>peYe0MCe1s7Xpq_jmeY3 zc5~e`V@t7WX9`3?|6Zq@nD&y}G%VniurMiugoYhjEA!vX@SY)h5Fai0%zc!~gJ!P7 zf0mXFAb(Qhy}XO%kz-%(3Bl6QS-aH75A#*l9r+|%Vau?_uVD2NnVq7sPc;) zddQm~Z%ZuAi5DC1drw7GcDyL&3W-Y@@^F=Nd@t}haJwSSHli-W3S+_;VVh*5Y=1l_ zE+G+d#o!rzs(;~I_tliaRy>7a3=PpNBcY6=O7*)XR1BKW(-d{1G>@4}44EIQo{o3R zb2YImYI)OmD~J*LZ4uVtFf12(esO{Fy4jWHeiVhJ!<70!Z8H{v;>Mo;pq ztwP1-vc@i}2`GL1i}hZCa!D^T1fu-NDs%nxYd&GafVKx0CRi>IkA$AVS{*p&rrG2& zCrE{xjn+=;H<*O`$$`HW zYT^0ngCCb%h^7-Z-QfqODpJ?2PRz}kzRW23!r8Z`aS`QelHICjmCi+N=LP2lL?28B zhynmG4fj!)x8B~4R~86{Q7;Zp%S5ejPTg;O9avIbaWQ4S@R({mJlH?)tAF^9mVV-$W-YQD( z$%KYaTdDPpdWs8|YnW3r?T;L+U{yO%iu_8m7?QJ*v)w;6ac>LhsdkNk_t-|R>>F2P zb$1j@rZmSRJCSk15i4s~QM1-Dr2>#OyZNU$EIKacVT+r145gynVqnNl) zVODb9(X7a}oslzS4T+szNYHgM4m^y#>c^wHVhMw{)8()EGrsSj<$kW9o?u|r+)*Lv z>ayFOouv<`ohka}e0;QY)jtwQ5B;a@TX~CB$2Wz3wt4cb<7iDE0K5ES(Ja-|tT$E) zvmvkgJ^4#Vpu0f#S)Wk~YGC=fHi>k|lMlO@OFhqgT;jSVv58Y}VEz=Hd36@t{q~{m8WDI08l$LWt|bFJwqvwEW0&gU#qaQa;dT zSxK&;+ok9)^&%$y<~(Ogvp=>NB&?@1r1av-^ik(> zN}wS`B4%D)*03N{)z2?Y{B{-4KQISrgTR7Bp06o&8L!wtvkK8(c13dbG4b(es}TGh z9J~IYI1x5`!qS~nk!gnVE?0IBZE9cep0NgFcgQ_wpK`t_2$FJ}Ahg54UuW}Im}YhU zy6~1;5%*xZ(OuopfARhc>frUY&(mhgL+XcSzh6u5jJ@-~dW-=P03_Be*9yk^d3TH= zY-Yji$+zmU;F*$ey~{#@D7Ch~{EPwcNK9y&H$;@rOk{9&sm8w&Uwr>sBTH){5v$TH zzDn)#_)mRFw)K$?GB`CBULI^OFZJomdc&wo?+Y}U58g`+2~^i1ucDZpn_1`P!NrFv z45P$2K-Hr)z!;}x(#ZMItJ)+K1sBreImr&^z$-$J_0kJ%E@_#X45HGs-eEi~lWg;T z(3)?l#`=GH&0=QeT!O^6c9dheVOb>FeV$KR@ju%B!F!Gn4+QhnYah4H;da&t{*JNV}4KcUsL#LCjTt$|X0>KlgqxF9ao?|Sa&ocVT}(cD7A zE(252=XXu?Zv`QMKS!sV@h|H}yjIQBXDvK~ebh&vKUON&Z!Q&bcDx;3p!8e`NCGkT z`~v;1Q4&aD9sFn-=3Jn-&Q3x8KV8`Lt>w>JzqlkryVtzzr{f(Ay?N?barv|t62mrU z5_2Fn5|FHHD9hqYEW|2u;;#?I?W=ik=@oT z-$gw|2z?p6z1R=M(Q`rOC!bCQ2R+zLSE093&-3$1{Dq=AI#K>7$6az(aGCSm#sel6 z+H9>0r88*Qh_T&E^(Ceko5V8{V@h!}EmsSEWnm<+Y)=75y^9?rNS@6h-{1cFjkDN! zWX&$on+N08?Gp+SSsiY7e*5&iNpy{GPjWlMLi3Z_`2s-+xw*?3YL5cHfw;Q5I;h0i zEzi}CDn9thLHtwzwJOd0@yzf+A?;aEc9brFfX<)&6SYMFu&Fs=y6=fXUSWwEW!sE= zf_;?^Am;d&|53Er=IZwcb!W$dGvg4YT_D@gPFNt49!3WZ*xlFCvO# zFIm{btf|d1C0UhJf1@xQk*ht;>}PFpr~qRvg?P`qi($!^aus5H6lL^!GZp_py2R5&?#k z>AI@k)5IcNw*a)oc7g6XM-oDC7hRmMr#>lUJeMuDZW3UuTFVj`h(!YbX-^=EtVCwK zK2%&@LZL5@?K?5LIa%&#yAm48^5N!(D)Q$dLfu^xbxa)Kn}R~Ox#E?3EUN5D8@ zb$^+ky)^59sE5^VPp#M70Qi1QV!oRWCqw@w#CtK8q|Xk}%!ti)v3-)qB%%$Pv` ztO_>Y@R!6nGdMu)BL+hVCG_Tua2Jqi$s8Bed|Htht4NvIp%j+?{*XH#1cC!>H2V5T zOq^=nHkj=WshaQv9gdr=MvoRK*Oabui~+tX`!%of)*s}$958$UR8Fj|Z0`T>{W%x( zJF9XpLTl8P4Q_g;FmdiIRsS35z4rS%#afZpfp1^Rf)(wfB!u|*0+iq`n*|niFDxxB zNoOl>O8msbVPcEzE+G11uq$4!&5z+_MnR}0FoIQ>Ix9}|bW>@{A)S;xwNeS#Z9X(q z_zO_WA;8shyVvLz^a=E?%fAFRgtZq$`S?zgE8WxBp_+ee-`*oD9;EHq_moR~h%J^qNxMO0wS(sw^_3`tTkqiD zzom5ccb8Xc?_b~rO}_N4MHj^0A{w0=1<+tc`r4=)XtGQ9Fh9ueFPoKRU$hx-cnfq$Xc&AdYm*6-OLJ=k2IJ&-voIrlM3JG#ak@j2BCTYT%4 z@muW;@E9>-yyj>D*n#AsVy6&az{#=D(6!wPyK!hO!J0=-+tN}c6^DGm@Sf_{LP zTl{OmOXmP$eie4!mairN&Lq?C| zkvyw(f9x?7m(?InKWq7$OIm8se%>#6uV%C~fe%GSz$0cN;IlQ2H5X=-!6`B|jk`0u zHb~dnD>#=Y&i?@6*HtEMUN30~OBXF@f)5+d9;d~ZdB;*VT(VH{@wcBf0A^Zy2Io22 zWdgFY)Kd4V_-L-eKV7D`e=^N8lGqj6V#D$3Zlht?y1uw3rHrH4Dei<$M$nSfbZmFT5i%AB?>^9LU)zUxniris1I*(<3L9OnE z$TMWH3O&o(|L^m2ul=H4>Pa})(yR{ZCcM@kOW6|faPsrxMB4-vY59K$|APD;l9By& zB{w~t%=h$XNvMhlt0`;J?g-4?O-V1bPbWVIAVk6ZEgrNHK^ShwoF(KK>Uev-xjxax z)d7=MX`wX8|~w8iU~>wPybVe2R=LUl$M^`-KMb6YhouL zTsR{g8`5wki0a_^-()>Cp4gzk2t`Exf-ykfrBYRQJL^YH-L~GQnSAnzh!Fa~vBjAT zaVnt=y1p}Oq(Ao5!%wp{KrQ7>fH(D6(igTg1O8Was0X z5Qi(X)IC3>swabA3#bsXL1esutCzgmvw@KmVYc9*oHSBR}Cjy1~k*sj;eO+ zRFw>v@6Nnbqgrlm9ctJ(nv^Ny&6eQ+hRkV4pv8gSMA6WOZ>)?!r~noulZ$3n!!f}3 z(_avNm-KuyHG)deV#WKg@tBp7U2h|-`Scqyy4dZQ9G+v%^l(}gndf9`KZN2#K0$9dqkssOw#&xY>!<)(D2-$ zVlSPM{_iOpl*r2_VOjrlYi9pv=*%vf1^@&Ho9c*jkpF>E%Hk- zrux%tT3&)09+}A3XcA~D)c&lrJ>FKhi)NM(^lRLyzXINe`L2dU{LNV{<&9K~EMST> z>gtD5Ad{HnqCi{;C(EO-0|DQ=u+ zP28tvC;2Seq@MXm+4be%CplW){(Dk(H=3?Vpr8yg-={!cVwh!^Z# zO>BAGewkUZ-)i4N<0o+U2L%Nm|M+tRjiHdJ!EHL(U7dhpdp~sky$6Ud@U%cM&+u#C z{grpu-4eHhz<$vw3R;3e<9^wEZKm%vIzeFjYh;S28brE#gx_=q# zMYvINxF3pwj^XleEn=1aa#fuY z(JcQk^RUvg7#Y~5U$3FV`}NbESAui>l)KVfLd!mduZ@omY((<{^k@nPX*Dg|<^EYe zvk%8+?4A+)xQs?iwUd#uQucAtRv!LJEwbO-&=(E4$X?-y@7v#+>Xz-(-ox(7s-0dt zoCHzrEhD`4X$tp7f);K0nR?adt$z6p;44!ZASeHLDS6ydP^c{%g``0WAxL@H7CsJc z72L$SgF4X`sX$3th8@uvIlDt6?)otm>^jAud19S8%&BWofQtc z>IhglbI|eG-QsyK{rfMaJT9iYmb}`o=P^|O`<9UMYT5s3S^MYx2SK;8y3;S2jaiLs zN!U9Du^x4o@}6vRO@yRexwi-wWppiyc*u^DFn=}P*7+8 zM`jQ~TfdRNW& e%qjaP>Fl7vg}|4e+Mhoa1(X!j<*Q}QL;nY*B_C!0 literal 0 HcmV?d00001 diff --git a/app/src/androidMain/res/drawable/document_text_outline.xml b/app/src/commonMain/composeResources/drawable/document_text_outline.xml similarity index 87% rename from app/src/androidMain/res/drawable/document_text_outline.xml rename to app/src/commonMain/composeResources/drawable/document_text_outline.xml index 82eee767..83fa4d62 100644 --- a/app/src/androidMain/res/drawable/document_text_outline.xml +++ b/app/src/commonMain/composeResources/drawable/document_text_outline.xml @@ -8,14 +8,14 @@ android:fillColor="#00000000" android:pathData="M416,221.25V416a48,48 0,0 1,-48 48H144a48,48 0,0 1,-48 -48V96a48,48 0,0 1,48 -48h98.75a32,32 0,0 1,22.62 9.37l141.26,141.26a32,32 0,0 1,9.37 22.62z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/ellipsis_vertical.xml b/app/src/commonMain/composeResources/drawable/ellipsis_vertical.xml similarity index 74% rename from app/src/androidMain/res/drawable/ellipsis_vertical.xml rename to app/src/commonMain/composeResources/drawable/ellipsis_vertical.xml index d239da23..384d33ef 100644 --- a/app/src/androidMain/res/drawable/ellipsis_vertical.xml +++ b/app/src/commonMain/composeResources/drawable/ellipsis_vertical.xml @@ -5,15 +5,15 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/extension_puzzle_outline.xml b/app/src/commonMain/composeResources/drawable/extension_puzzle_outline.xml similarity index 94% rename from app/src/androidMain/res/drawable/extension_puzzle_outline.xml rename to app/src/commonMain/composeResources/drawable/extension_puzzle_outline.xml index e7fdcecd..48044f8f 100644 --- a/app/src/androidMain/res/drawable/extension_puzzle_outline.xml +++ b/app/src/commonMain/composeResources/drawable/extension_puzzle_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M413.66,246.1H386a2,2 0,0 1,-2 -2v-77.24A38.86,38.86 0,0 0,345.14 128H267.9a2,2 0,0 1,-2 -2V98.34c0,-27.14 -21.5,-49.86 -48.64,-50.33a49.53,49.53 0,0 0,-50.4 49.51V126a2,2 0,0 1,-2 2H87.62A39.74,39.74 0,0 0,48 167.62V238a2,2 0,0 0,2 2h26.91c29.37,0 53.68,25.48 54.09,54.85 0.42,29.87 -23.51,57.15 -53.29,57.15H50a2,2 0,0 0,-2 2v70.38A39.74,39.74 0,0 0,87.62 464H158a2,2 0,0 0,2 -2v-20.93c0,-30.28 24.75,-56.35 55,-57.06 30.1,-0.7 57,20.31 57,50.28V462a2,2 0,0 0,2 2h71.14A38.86,38.86 0,0 0,384 425.14v-78a2,2 0,0 1,2 -2h28.48c27.63,0 49.52,-22.67 49.52,-50.4s-23.2,-48.64 -50.34,-48.64z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/eye_off_outline.xml b/app/src/commonMain/composeResources/drawable/eye_off_outline.xml similarity index 93% rename from app/src/androidMain/res/drawable/eye_off_outline.xml rename to app/src/commonMain/composeResources/drawable/eye_off_outline.xml index 3f856775..54ef5dd1 100644 --- a/app/src/androidMain/res/drawable/eye_off_outline.xml +++ b/app/src/commonMain/composeResources/drawable/eye_off_outline.xml @@ -5,11 +5,11 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/eye_outline.xml b/app/src/commonMain/composeResources/drawable/eye_outline.xml similarity index 87% rename from app/src/androidMain/res/drawable/eye_outline.xml rename to app/src/commonMain/composeResources/drawable/eye_outline.xml index 4f4a5746..5825fbe4 100644 --- a/app/src/androidMain/res/drawable/eye_outline.xml +++ b/app/src/commonMain/composeResources/drawable/eye_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M255.66,112c-77.94,0 -157.89,45.11 -220.83,135.33a16,16 0,0 0,-0.27 17.77C82.92,340.8 161.8,400 255.66,400c92.84,0 173.34,-59.38 221.79,-135.25a16.14,16.14 0,0 0,0 -17.47C428.89,172.28 347.8,112 255.66,112z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,6 +16,6 @@ android:fillColor="#00000000" android:pathData="M256,256m-80,0a80,80 0,1 1,160 0a80,80 0,1 1,-160 0" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> diff --git a/app/src/androidMain/res/drawable/fediverse_logo.png b/app/src/commonMain/composeResources/drawable/fediverse_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/fediverse_logo.png rename to app/src/commonMain/composeResources/drawable/fediverse_logo.png diff --git a/app/src/androidMain/res/drawable/full_character.png b/app/src/commonMain/composeResources/drawable/full_character.png similarity index 100% rename from app/src/androidMain/res/drawable/full_character.png rename to app/src/commonMain/composeResources/drawable/full_character.png diff --git a/app/src/androidMain/res/drawable/grid.xml b/app/src/commonMain/composeResources/drawable/grid.xml similarity index 92% rename from app/src/androidMain/res/drawable/grid.xml rename to app/src/commonMain/composeResources/drawable/grid.xml index 1f2eaf8d..abfda0d4 100644 --- a/app/src/androidMain/res/drawable/grid.xml +++ b/app/src/commonMain/composeResources/drawable/grid.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/grid_outline.xml b/app/src/commonMain/composeResources/drawable/grid_outline.xml similarity index 86% rename from app/src/androidMain/res/drawable/grid_outline.xml rename to app/src/commonMain/composeResources/drawable/grid_outline.xml index d9d328a3..0cecf26e 100644 --- a/app/src/androidMain/res/drawable/grid_outline.xml +++ b/app/src/commonMain/composeResources/drawable/grid_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M68,48L204,48A20,20 0,0 1,224 68L224,204A20,20 0,0 1,204 224L68,224A20,20 0,0 1,48 204L48,68A20,20 0,0 1,68 48z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,7 +16,7 @@ android:fillColor="#00000000" android:pathData="M308,48L444,48A20,20 0,0 1,464 68L464,204A20,20 0,0 1,444 224L308,224A20,20 0,0 1,288 204L288,68A20,20 0,0 1,308 48z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -24,7 +24,7 @@ android:fillColor="#00000000" android:pathData="M68,288L204,288A20,20 0,0 1,224 308L224,444A20,20 0,0 1,204 464L68,464A20,20 0,0 1,48 444L48,308A20,20 0,0 1,68 288z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -32,7 +32,7 @@ android:fillColor="#00000000" android:pathData="M308,288L444,288A20,20 0,0 1,464 308L464,444A20,20 0,0 1,444 464L308,464A20,20 0,0 1,288 444L288,308A20,20 0,0 1,308 288z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/commonMain/composeResources/drawable/hash.xml b/app/src/commonMain/composeResources/drawable/hash.xml new file mode 100644 index 00000000..e9bb36b9 --- /dev/null +++ b/app/src/commonMain/composeResources/drawable/hash.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/androidMain/res/drawable/heart.xml b/app/src/commonMain/composeResources/drawable/heart.xml similarity index 91% rename from app/src/androidMain/res/drawable/heart.xml rename to app/src/commonMain/composeResources/drawable/heart.xml index 36a46082..021ba7fc 100644 --- a/app/src/androidMain/res/drawable/heart.xml +++ b/app/src/commonMain/composeResources/drawable/heart.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/heart_outline.xml b/app/src/commonMain/composeResources/drawable/heart_outline.xml similarity index 91% rename from app/src/androidMain/res/drawable/heart_outline.xml rename to app/src/commonMain/composeResources/drawable/heart_outline.xml index 5ae293b8..323c9315 100644 --- a/app/src/androidMain/res/drawable/heart_outline.xml +++ b/app/src/commonMain/composeResources/drawable/heart_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M352.92,80C288,80 256,144 256,144s-32,-64 -96.92,-64c-52.76,0 -94.54,44.14 -95.08,96.81 -1.1,109.33 86.73,187.08 183,252.42a16,16 0,0 0,18 0c96.26,-65.34 184.09,-143.09 183,-252.42 -0.54,-52.67 -42.32,-96.81 -95.08,-96.81z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/help_circle_outline.xml b/app/src/commonMain/composeResources/drawable/help_circle_outline.xml similarity index 82% rename from app/src/androidMain/res/drawable/help_circle_outline.xml rename to app/src/commonMain/composeResources/drawable/help_circle_outline.xml index 80ee788a..c1def38e 100644 --- a/app/src/androidMain/res/drawable/help_circle_outline.xml +++ b/app/src/commonMain/composeResources/drawable/help_circle_outline.xml @@ -8,17 +8,17 @@ android:fillColor="#00000000" android:pathData="M256,80a176,176 0,1 0,176 176A176,176 0,0 0,256 80z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> diff --git a/app/src/androidMain/res/drawable/help_outline.xml b/app/src/commonMain/composeResources/drawable/help_outline.xml similarity index 85% rename from app/src/androidMain/res/drawable/help_outline.xml rename to app/src/commonMain/composeResources/drawable/help_outline.xml index 82328482..626d1b6b 100644 --- a/app/src/androidMain/res/drawable/help_outline.xml +++ b/app/src/commonMain/composeResources/drawable/help_outline.xml @@ -8,11 +8,11 @@ android:fillColor="#00000000" android:pathData="M160,164s1.44,-33 33.54,-59.46C212.6,88.83 235.49,84.28 256,84c18.73,-0.23 35.47,2.94 45.48,7.82C318.59,100.2 352,120.6 352,164c0,45.67 -29.18,66.37 -62.35,89.18S248,298.36 248,324" android:strokeWidth="40" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" /> diff --git a/app/src/androidMain/res/drawable/house.xml b/app/src/commonMain/composeResources/drawable/house.xml similarity index 90% rename from app/src/androidMain/res/drawable/house.xml rename to app/src/commonMain/composeResources/drawable/house.xml index a4a9cc1d..c1bf296c 100644 --- a/app/src/androidMain/res/drawable/house.xml +++ b/app/src/commonMain/composeResources/drawable/house.xml @@ -5,5 +5,5 @@ android:viewportHeight="256"> + android:fillColor="#000000"/> diff --git a/app/src/androidMain/res/drawable/house_fill.xml b/app/src/commonMain/composeResources/drawable/house_fill.xml similarity index 89% rename from app/src/androidMain/res/drawable/house_fill.xml rename to app/src/commonMain/composeResources/drawable/house_fill.xml index d1fae213..f028bc84 100644 --- a/app/src/androidMain/res/drawable/house_fill.xml +++ b/app/src/commonMain/composeResources/drawable/house_fill.xml @@ -5,5 +5,5 @@ android:viewportHeight="256"> + android:fillColor="#000000"/> diff --git a/app/src/androidMain/res/drawable/lemmy_logo.png b/app/src/commonMain/composeResources/drawable/lemmy_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/lemmy_logo.png rename to app/src/commonMain/composeResources/drawable/lemmy_logo.png diff --git a/app/src/androidMain/res/drawable/list_outline.xml b/app/src/commonMain/composeResources/drawable/list_outline.xml similarity index 85% rename from app/src/androidMain/res/drawable/list_outline.xml rename to app/src/commonMain/composeResources/drawable/list_outline.xml index 5d892305..8017d384 100644 --- a/app/src/androidMain/res/drawable/list_outline.xml +++ b/app/src/commonMain/composeResources/drawable/list_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M144.74,126.19H478.53M144.74,256H478.53M144.74,385.81h333.79" android:strokeWidth="37.0878" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,7 +16,7 @@ android:fillColor="#00000000" android:pathData="M52.02,126.19m-18.54,0a18.54,18.54 0,1 1,37.09 0a18.54,18.54 0,1 1,-37.09 0" android:strokeWidth="37.0878" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -24,7 +24,7 @@ android:fillColor="#00000000" android:pathData="M52.02,256m-18.54,0a18.54,18.54 0,1 1,37.09 0a18.54,18.54 0,1 1,-37.09 0" android:strokeWidth="37.0878" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -32,7 +32,7 @@ android:fillColor="#00000000" android:pathData="M52.02,385.81m-18.54,0a18.54,18.54 0,1 1,37.09 0a18.54,18.54 0,1 1,-37.09 0" android:strokeWidth="37.0878" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/log_out_outline.xml b/app/src/commonMain/composeResources/drawable/log_out_outline.xml similarity index 90% rename from app/src/androidMain/res/drawable/log_out_outline.xml rename to app/src/commonMain/composeResources/drawable/log_out_outline.xml index 043020b9..c070eb70 100644 --- a/app/src/androidMain/res/drawable/log_out_outline.xml +++ b/app/src/commonMain/composeResources/drawable/log_out_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M304,336v40a40,40 0,0 1,-40 40H104a40,40 0,0 1,-40 -40V136a40,40 0,0 1,40 -40h152c22.09,0 48,17.91 48,40v40M368,336l80,-80 -80,-80M176,256h256" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/login_wave_dark.png b/app/src/commonMain/composeResources/drawable/login_wave_dark.png similarity index 100% rename from app/src/androidMain/res/drawable/login_wave_dark.png rename to app/src/commonMain/composeResources/drawable/login_wave_dark.png diff --git a/app/src/androidMain/res/drawable/login_wave_light.png b/app/src/commonMain/composeResources/drawable/login_wave_light.png similarity index 100% rename from app/src/androidMain/res/drawable/login_wave_light.png rename to app/src/commonMain/composeResources/drawable/login_wave_light.png diff --git a/app/src/androidMain/res/drawable/mail_outline.xml b/app/src/commonMain/composeResources/drawable/mail_outline.xml similarity index 86% rename from app/src/androidMain/res/drawable/mail_outline.xml rename to app/src/commonMain/composeResources/drawable/mail_outline.xml index 9fa5e5e6..d741f193 100644 --- a/app/src/androidMain/res/drawable/mail_outline.xml +++ b/app/src/commonMain/composeResources/drawable/mail_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M88,96L424,96A40,40 0,0 1,464 136L464,376A40,40 0,0 1,424 416L88,416A40,40 0,0 1,48 376L48,136A40,40 0,0 1,88 96z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,7 +16,7 @@ android:fillColor="#00000000" android:pathData="M112,160l144,112 144,-112" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/mastodon_logo.png b/app/src/commonMain/composeResources/drawable/mastodon_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/mastodon_logo.png rename to app/src/commonMain/composeResources/drawable/mastodon_logo.png diff --git a/app/src/androidMain/res/drawable/misskey_logo.png b/app/src/commonMain/composeResources/drawable/misskey_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/misskey_logo.png rename to app/src/commonMain/composeResources/drawable/misskey_logo.png diff --git a/app/src/androidMain/res/drawable/notifications.xml b/app/src/commonMain/composeResources/drawable/notifications.xml similarity index 94% rename from app/src/androidMain/res/drawable/notifications.xml rename to app/src/commonMain/composeResources/drawable/notifications.xml index 1df0de9c..cbefce4c 100644 --- a/app/src/androidMain/res/drawable/notifications.xml +++ b/app/src/commonMain/composeResources/drawable/notifications.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/notifications_outline.xml b/app/src/commonMain/composeResources/drawable/notifications_outline.xml similarity index 93% rename from app/src/androidMain/res/drawable/notifications_outline.xml rename to app/src/commonMain/composeResources/drawable/notifications_outline.xml index 41872fc0..db571623 100644 --- a/app/src/androidMain/res/drawable/notifications_outline.xml +++ b/app/src/commonMain/composeResources/drawable/notifications_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M427.68,351.43C402,320 383.87,304 383.87,217.35 383.87,138 343.35,109.73 310,96c-4.43,-1.82 -8.6,-6 -9.95,-10.55C294.2,65.54 277.8,48 256,48s-38.21,17.55 -44,37.47c-1.35,4.6 -5.52,8.71 -9.95,10.53 -33.39,13.75 -73.87,41.92 -73.87,121.35C128.13,304 110,320 84.32,351.43 73.68,364.45 83,384 101.61,384h308.88c18.51,0 27.77,-19.61 17.19,-32.57zM320,384v16a64,64 0,0 1,-128 0v-16" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/open_outline.xml b/app/src/commonMain/composeResources/drawable/open_outline.xml similarity index 90% rename from app/src/androidMain/res/drawable/open_outline.xml rename to app/src/commonMain/composeResources/drawable/open_outline.xml index 866ddaec..a326192e 100644 --- a/app/src/androidMain/res/drawable/open_outline.xml +++ b/app/src/commonMain/composeResources/drawable/open_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M384,224v184a40,40 0,0 1,-40 40H104a40,40 0,0 1,-40 -40V168a40,40 0,0 1,40 -40h167.48M336,64h112v112M224,288L440,72" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/paper_plane_right.xml b/app/src/commonMain/composeResources/drawable/paper_plane_right.xml similarity index 90% rename from app/src/androidMain/res/drawable/paper_plane_right.xml rename to app/src/commonMain/composeResources/drawable/paper_plane_right.xml index 9c730919..176dc6e5 100644 --- a/app/src/androidMain/res/drawable/paper_plane_right.xml +++ b/app/src/commonMain/composeResources/drawable/paper_plane_right.xml @@ -5,7 +5,7 @@ android:viewportHeight="256"> diff --git a/app/src/androidMain/res/drawable/peertube_logo.png b/app/src/commonMain/composeResources/drawable/peertube_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/peertube_logo.png rename to app/src/commonMain/composeResources/drawable/peertube_logo.png diff --git a/app/src/androidMain/res/drawable/pencil_outline.xml b/app/src/commonMain/composeResources/drawable/pencil_outline.xml similarity index 91% rename from app/src/androidMain/res/drawable/pencil_outline.xml rename to app/src/commonMain/composeResources/drawable/pencil_outline.xml index 75bdd164..51488dae 100644 --- a/app/src/androidMain/res/drawable/pencil_outline.xml +++ b/app/src/commonMain/composeResources/drawable/pencil_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M364.13,125.25L87,403l-23,45 44.99,-23 277.76,-277.13 -22.62,-22.62zM420.69,68.69l-22.62,22.62 22.62,22.63 22.62,-22.63a16,16 0,0 0,0 -22.62h0a16,16 0,0 0,-22.62 0z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/pixelfed_logo.png b/app/src/commonMain/composeResources/drawable/pixelfed_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/pixelfed_logo.png rename to app/src/commonMain/composeResources/drawable/pixelfed_logo.png diff --git a/app/src/androidMain/res/drawable/pixelix_logo.png b/app/src/commonMain/composeResources/drawable/pixelix_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/pixelix_logo.png rename to app/src/commonMain/composeResources/drawable/pixelix_logo.png diff --git a/app/src/androidMain/res/drawable/pixelix_logo_black_xxl.png b/app/src/commonMain/composeResources/drawable/pixelix_logo_black_xxl.png similarity index 100% rename from app/src/androidMain/res/drawable/pixelix_logo_black_xxl.png rename to app/src/commonMain/composeResources/drawable/pixelix_logo_black_xxl.png diff --git a/app/src/androidMain/res/drawable/pixelix_logo_old.png b/app/src/commonMain/composeResources/drawable/pixelix_logo_old.png similarity index 100% rename from app/src/androidMain/res/drawable/pixelix_logo_old.png rename to app/src/commonMain/composeResources/drawable/pixelix_logo_old.png diff --git a/app/src/androidMain/res/drawable/pixelix_logo_white_xxl.png b/app/src/commonMain/composeResources/drawable/pixelix_logo_white_xxl.png similarity index 100% rename from app/src/androidMain/res/drawable/pixelix_logo_white_xxl.png rename to app/src/commonMain/composeResources/drawable/pixelix_logo_white_xxl.png diff --git a/app/src/androidMain/res/drawable/planet_outline.xml b/app/src/commonMain/composeResources/drawable/planet_outline.xml similarity index 84% rename from app/src/androidMain/res/drawable/planet_outline.xml rename to app/src/commonMain/composeResources/drawable/planet_outline.xml index db1d60b2..b8ad61cd 100644 --- a/app/src/androidMain/res/drawable/planet_outline.xml +++ b/app/src/commonMain/composeResources/drawable/planet_outline.xml @@ -8,12 +8,12 @@ android:fillColor="#00000000" android:pathData="M413.48,284.46c58.87,47.24 91.61,89 80.31,108.55 -17.85,30.85 -138.78,-5.48 -270.1,-81.15S0.37,149.84 18.21,119c11.16,-19.28 62.58,-12.32 131.64,14.09" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> + android:strokeColor="#000000" /> diff --git a/app/src/commonMain/composeResources/drawable/refresh_icon.xml b/app/src/commonMain/composeResources/drawable/refresh_icon.xml new file mode 100644 index 00000000..b0864e3f --- /dev/null +++ b/app/src/commonMain/composeResources/drawable/refresh_icon.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/androidMain/res/drawable/remove_circle_outline.xml b/app/src/commonMain/composeResources/drawable/remove_circle_outline.xml similarity index 84% rename from app/src/androidMain/res/drawable/remove_circle_outline.xml rename to app/src/commonMain/composeResources/drawable/remove_circle_outline.xml index beb355d1..123f8a48 100644 --- a/app/src/androidMain/res/drawable/remove_circle_outline.xml +++ b/app/src/commonMain/composeResources/drawable/remove_circle_outline.xml @@ -8,13 +8,13 @@ android:fillColor="#00000000" android:pathData="M448,256c0,-106 -86,-192 -192,-192S64,150 64,256s86,192 192,192 192,-86 192,-192z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> diff --git a/app/src/androidMain/res/drawable/reorder_four.xml b/app/src/commonMain/composeResources/drawable/reorder_four.xml similarity index 89% rename from app/src/androidMain/res/drawable/reorder_four.xml rename to app/src/commonMain/composeResources/drawable/reorder_four.xml index dbeac01f..8d30157b 100644 --- a/app/src/androidMain/res/drawable/reorder_four.xml +++ b/app/src/commonMain/composeResources/drawable/reorder_four.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M55.17,318.6H456.83M55.17,193.4H456.83M55.17,68.21H456.83M55.17,443.79H456.83" android:strokeWidth="57.3793" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/reorder_four_outline.xml b/app/src/commonMain/composeResources/drawable/reorder_four_outline.xml similarity index 89% rename from app/src/androidMain/res/drawable/reorder_four_outline.xml rename to app/src/commonMain/composeResources/drawable/reorder_four_outline.xml index faec91bf..2aed3a8a 100644 --- a/app/src/androidMain/res/drawable/reorder_four_outline.xml +++ b/app/src/commonMain/composeResources/drawable/reorder_four_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M45.54,319.14H466.46M45.54,192.86H466.46M45.54,66.58H466.46M45.54,445.42H466.46" android:strokeWidth="42.0923" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/save_outline.xml b/app/src/commonMain/composeResources/drawable/save_outline.xml similarity index 93% rename from app/src/androidMain/res/drawable/save_outline.xml rename to app/src/commonMain/composeResources/drawable/save_outline.xml index 29c4b721..4b8245e9 100644 --- a/app/src/androidMain/res/drawable/save_outline.xml +++ b/app/src/commonMain/composeResources/drawable/save_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M380.93,57.37A32,32 0,0 0,358.3 48L94.22,48A46.21,46.21 0,0 0,48 94.22v323.56A46.21,46.21 0,0 0,94.22 464h323.56A46.36,46.36 0,0 0,464 417.78L464,153.7a32,32 0,0 0,-9.37 -22.63zM256,416a64,64 0,1 1,64 -64,63.92 63.92,0 0,1 -64,64zM304,192L112,192a16,16 0,0 1,-16 -16v-64a16,16 0,0 1,16 -16h192a16,16 0,0 1,16 16v64a16,16 0,0 1,-16 16z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/search.xml b/app/src/commonMain/composeResources/drawable/search.xml similarity index 90% rename from app/src/androidMain/res/drawable/search.xml rename to app/src/commonMain/composeResources/drawable/search.xml index 25fcacc7..40690874 100644 --- a/app/src/androidMain/res/drawable/search.xml +++ b/app/src/commonMain/composeResources/drawable/search.xml @@ -5,7 +5,7 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/search_outline.xml b/app/src/commonMain/composeResources/drawable/search_outline.xml similarity index 83% rename from app/src/androidMain/res/drawable/search_outline.xml rename to app/src/commonMain/composeResources/drawable/search_outline.xml index 7aaa5187..ffae7a43 100644 --- a/app/src/androidMain/res/drawable/search_outline.xml +++ b/app/src/commonMain/composeResources/drawable/search_outline.xml @@ -8,13 +8,13 @@ android:fillColor="#00000000" android:pathData="M221.09,64a157.09,157.09 0,1 0,157.09 157.09A157.1,157.1 0,0 0,221.09 64z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" /> + android:strokeColor="#000000" /> diff --git a/app/src/androidMain/res/drawable/settings_outline.xml b/app/src/commonMain/composeResources/drawable/settings_outline.xml similarity index 96% rename from app/src/androidMain/res/drawable/settings_outline.xml rename to app/src/commonMain/composeResources/drawable/settings_outline.xml index 7109975c..6d5d342b 100644 --- a/app/src/androidMain/res/drawable/settings_outline.xml +++ b/app/src/commonMain/composeResources/drawable/settings_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M262.29,192.31a64,64 0,1 0,57.4 57.4,64.13 64.13,0 0,0 -57.4,-57.4zM416.39,256a154.34,154.34 0,0 1,-1.53 20.79l45.21,35.46a10.81,10.81 0,0 1,2.45 13.75l-42.77,74a10.81,10.81 0,0 1,-13.14 4.59l-44.9,-18.08a16.11,16.11 0,0 0,-15.17 1.75A164.48,164.48 0,0 1,325 400.8a15.94,15.94 0,0 0,-8.82 12.14l-6.73,47.89a11.08,11.08 0,0 1,-10.68 9.17h-85.54a11.11,11.11 0,0 1,-10.69 -8.87l-6.72,-47.82a16.07,16.07 0,0 0,-9 -12.22,155.3 155.3,0 0,1 -21.46,-12.57 16,16 0,0 0,-15.11 -1.71l-44.89,18.07a10.81,10.81 0,0 1,-13.14 -4.58l-42.77,-74a10.8,10.8 0,0 1,2.45 -13.75l38.21,-30a16.05,16.05 0,0 0,6 -14.08c-0.36,-4.17 -0.58,-8.33 -0.58,-12.5s0.21,-8.27 0.58,-12.35a16,16 0,0 0,-6.07 -13.94l-38.19,-30A10.81,10.81 0,0 1,49.48 186l42.77,-74a10.81,10.81 0,0 1,13.14 -4.59l44.9,18.08a16.11,16.11 0,0 0,15.17 -1.75A164.48,164.48 0,0 1,187 111.2a15.94,15.94 0,0 0,8.82 -12.14l6.73,-47.89A11.08,11.08 0,0 1,213.23 42h85.54a11.11,11.11 0,0 1,10.69 8.87l6.72,47.82a16.07,16.07 0,0 0,9 12.22,155.3 155.3,0 0,1 21.46,12.57 16,16 0,0 0,15.11 1.71l44.89,-18.07a10.81,10.81 0,0 1,13.14 4.58l42.77,74a10.8,10.8 0,0 1,-2.45 13.75l-38.21,30a16.05,16.05 0,0 0,-6.05 14.08c0.33,4.14 0.55,8.3 0.55,12.47z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/share_social_outline.xml b/app/src/commonMain/composeResources/drawable/share_social_outline.xml similarity index 84% rename from app/src/androidMain/res/drawable/share_social_outline.xml rename to app/src/commonMain/composeResources/drawable/share_social_outline.xml index 6ad403b1..1f9c5abb 100644 --- a/app/src/androidMain/res/drawable/share_social_outline.xml +++ b/app/src/commonMain/composeResources/drawable/share_social_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M128,256m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,7 +16,7 @@ android:fillColor="#00000000" android:pathData="M384,112m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -24,7 +24,7 @@ android:fillColor="#00000000" android:pathData="M384,400m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -32,7 +32,7 @@ android:fillColor="#00000000" android:pathData="M169.83,279.53l172.34,96.94M342.17,135.53l-172.34,96.94" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/shield_outline.xml b/app/src/commonMain/composeResources/drawable/shield_outline.xml similarity index 90% rename from app/src/androidMain/res/drawable/shield_outline.xml rename to app/src/commonMain/composeResources/drawable/shield_outline.xml index 51ac027e..839b06c5 100644 --- a/app/src/androidMain/res/drawable/shield_outline.xml +++ b/app/src/commonMain/composeResources/drawable/shield_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M463.1,112.37C373.68,96.33 336.71,84.45 256,48c-80.71,36.45 -117.68,48.33 -207.1,64.37C32.7,369.13 240.58,457.79 256,464c15.42,-6.21 223.3,-94.87 207.1,-351.63z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/square_outline.xml b/app/src/commonMain/composeResources/drawable/square_outline.xml similarity index 90% rename from app/src/androidMain/res/drawable/square_outline.xml rename to app/src/commonMain/composeResources/drawable/square_outline.xml index b7785e29..d2de6efb 100644 --- a/app/src/androidMain/res/drawable/square_outline.xml +++ b/app/src/commonMain/composeResources/drawable/square_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M416,448H96a32.09,32.09 0,0 1,-32 -32V96a32.09,32.09 0,0 1,32 -32h320a32.09,32.09 0,0 1,32 32v320a32.09,32.09 0,0 1,-32 32z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/stack.xml b/app/src/commonMain/composeResources/drawable/stack.xml similarity index 82% rename from app/src/androidMain/res/drawable/stack.xml rename to app/src/commonMain/composeResources/drawable/stack.xml index f26699a4..2fe52942 100644 --- a/app/src/androidMain/res/drawable/stack.xml +++ b/app/src/commonMain/composeResources/drawable/stack.xml @@ -5,11 +5,11 @@ android:viewportHeight="512"> diff --git a/app/src/androidMain/res/drawable/star_outline.xml b/app/src/commonMain/composeResources/drawable/star_outline.xml similarity index 88% rename from app/src/androidMain/res/drawable/star_outline.xml rename to app/src/commonMain/composeResources/drawable/star_outline.xml index b79dbcee..a35e4626 100644 --- a/app/src/androidMain/res/drawable/star_outline.xml +++ b/app/src/commonMain/composeResources/drawable/star_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M480,208H308L256,48l-52,160H32l140,96 -54,160 138,-100 138,100 -54,-160z" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/sync_outline.xml b/app/src/commonMain/composeResources/drawable/sync_outline.xml similarity index 87% rename from app/src/androidMain/res/drawable/sync_outline.xml rename to app/src/commonMain/composeResources/drawable/sync_outline.xml index 20e4e085..f1e5bf3f 100644 --- a/app/src/androidMain/res/drawable/sync_outline.xml +++ b/app/src/commonMain/composeResources/drawable/sync_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M434.67,285.59v-29.8c0,-98.73 -80.24,-178.79 -179.2,-178.79a179,179 0,0 0,-140.14 67.36m-38.53,82v29.8C76.8,355 157,435 256,435a180.45,180.45 0,0 0,140 -66.92" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,7 +16,7 @@ android:fillColor="#00000000" android:pathData="M32,256l44,-44 46,44M480,256l-44,44 -46,-44" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/androidMain/res/drawable/threads_logo.png b/app/src/commonMain/composeResources/drawable/threads_logo.png similarity index 100% rename from app/src/androidMain/res/drawable/threads_logo.png rename to app/src/commonMain/composeResources/drawable/threads_logo.png diff --git a/app/src/androidMain/res/drawable/trash_outline.xml b/app/src/commonMain/composeResources/drawable/trash_outline.xml similarity index 85% rename from app/src/androidMain/res/drawable/trash_outline.xml rename to app/src/commonMain/composeResources/drawable/trash_outline.xml index aebde008..dbde39f9 100644 --- a/app/src/androidMain/res/drawable/trash_outline.xml +++ b/app/src/commonMain/composeResources/drawable/trash_outline.xml @@ -8,7 +8,7 @@ android:fillColor="#00000000" android:pathData="M112,112l20,320c0.95,18.49 14.4,32 32,32h184c17.67,0 30.87,-13.51 32,-32l20,-320" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" /> @@ -16,14 +16,14 @@ android:fillColor="#FF000000" android:pathData="M80,112h352" android:strokeWidth="32" - android:strokeColor="?attr/colorOnBackground" + android:strokeColor="#000000" android:strokeLineCap="round" /> diff --git a/app/src/androidMain/res/values-af-rZA/strings.xml b/app/src/commonMain/composeResources/values-af-rZA/strings.xml similarity index 100% rename from app/src/androidMain/res/values-af-rZA/strings.xml rename to app/src/commonMain/composeResources/values-af-rZA/strings.xml diff --git a/app/src/androidMain/res/values-ar-rSA/strings.xml b/app/src/commonMain/composeResources/values-ar-rSA/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ar-rSA/strings.xml rename to app/src/commonMain/composeResources/values-ar-rSA/strings.xml diff --git a/app/src/androidMain/res/values-ca-rES/strings.xml b/app/src/commonMain/composeResources/values-ca-rES/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ca-rES/strings.xml rename to app/src/commonMain/composeResources/values-ca-rES/strings.xml diff --git a/app/src/androidMain/res/values-cs-rCZ/strings.xml b/app/src/commonMain/composeResources/values-cs-rCZ/strings.xml similarity index 100% rename from app/src/androidMain/res/values-cs-rCZ/strings.xml rename to app/src/commonMain/composeResources/values-cs-rCZ/strings.xml diff --git a/app/src/androidMain/res/values-da-rDK/strings.xml b/app/src/commonMain/composeResources/values-da-rDK/strings.xml similarity index 100% rename from app/src/androidMain/res/values-da-rDK/strings.xml rename to app/src/commonMain/composeResources/values-da-rDK/strings.xml diff --git a/app/src/androidMain/res/values-de-rDE/strings.xml b/app/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 100% rename from app/src/androidMain/res/values-de-rDE/strings.xml rename to app/src/commonMain/composeResources/values-de-rDE/strings.xml diff --git a/app/src/androidMain/res/values-de/strings.xml b/app/src/commonMain/composeResources/values-de/strings.xml similarity index 100% rename from app/src/androidMain/res/values-de/strings.xml rename to app/src/commonMain/composeResources/values-de/strings.xml diff --git a/app/src/androidMain/res/values-el-rGR/strings.xml b/app/src/commonMain/composeResources/values-el-rGR/strings.xml similarity index 100% rename from app/src/androidMain/res/values-el-rGR/strings.xml rename to app/src/commonMain/composeResources/values-el-rGR/strings.xml diff --git a/app/src/androidMain/res/values-en-rUS/strings.xml b/app/src/commonMain/composeResources/values-en-rUS/strings.xml similarity index 100% rename from app/src/androidMain/res/values-en-rUS/strings.xml rename to app/src/commonMain/composeResources/values-en-rUS/strings.xml diff --git a/app/src/androidMain/res/values-eo-rUY/strings.xml b/app/src/commonMain/composeResources/values-eo-rUY/strings.xml similarity index 100% rename from app/src/androidMain/res/values-eo-rUY/strings.xml rename to app/src/commonMain/composeResources/values-eo-rUY/strings.xml diff --git a/app/src/androidMain/res/values-es-rES/strings.xml b/app/src/commonMain/composeResources/values-es-rES/strings.xml similarity index 100% rename from app/src/androidMain/res/values-es-rES/strings.xml rename to app/src/commonMain/composeResources/values-es-rES/strings.xml diff --git a/app/src/androidMain/res/values-fi-rFI/strings.xml b/app/src/commonMain/composeResources/values-fi-rFI/strings.xml similarity index 100% rename from app/src/androidMain/res/values-fi-rFI/strings.xml rename to app/src/commonMain/composeResources/values-fi-rFI/strings.xml diff --git a/app/src/androidMain/res/values-fr-rFR/strings.xml b/app/src/commonMain/composeResources/values-fr-rFR/strings.xml similarity index 100% rename from app/src/androidMain/res/values-fr-rFR/strings.xml rename to app/src/commonMain/composeResources/values-fr-rFR/strings.xml diff --git a/app/src/androidMain/res/values-gl-rES/strings.xml b/app/src/commonMain/composeResources/values-gl-rES/strings.xml similarity index 100% rename from app/src/androidMain/res/values-gl-rES/strings.xml rename to app/src/commonMain/composeResources/values-gl-rES/strings.xml diff --git a/app/src/androidMain/res/values-hu-rHU/strings.xml b/app/src/commonMain/composeResources/values-hu-rHU/strings.xml similarity index 100% rename from app/src/androidMain/res/values-hu-rHU/strings.xml rename to app/src/commonMain/composeResources/values-hu-rHU/strings.xml diff --git a/app/src/androidMain/res/values-io-rEN/strings.xml b/app/src/commonMain/composeResources/values-io-rEN/strings.xml similarity index 100% rename from app/src/androidMain/res/values-io-rEN/strings.xml rename to app/src/commonMain/composeResources/values-io-rEN/strings.xml diff --git a/app/src/androidMain/res/values-it-rIT/strings.xml b/app/src/commonMain/composeResources/values-it-rIT/strings.xml similarity index 100% rename from app/src/androidMain/res/values-it-rIT/strings.xml rename to app/src/commonMain/composeResources/values-it-rIT/strings.xml diff --git a/app/src/androidMain/res/values-iw-rIL/strings.xml b/app/src/commonMain/composeResources/values-iw-rIL/strings.xml similarity index 100% rename from app/src/androidMain/res/values-iw-rIL/strings.xml rename to app/src/commonMain/composeResources/values-iw-rIL/strings.xml diff --git a/app/src/androidMain/res/values-ja-rJP/strings.xml b/app/src/commonMain/composeResources/values-ja-rJP/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ja-rJP/strings.xml rename to app/src/commonMain/composeResources/values-ja-rJP/strings.xml diff --git a/app/src/androidMain/res/values-ko-rKR/strings.xml b/app/src/commonMain/composeResources/values-ko-rKR/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ko-rKR/strings.xml rename to app/src/commonMain/composeResources/values-ko-rKR/strings.xml diff --git a/app/src/androidMain/res/values-nl-rNL/strings.xml b/app/src/commonMain/composeResources/values-nl-rNL/strings.xml similarity index 100% rename from app/src/androidMain/res/values-nl-rNL/strings.xml rename to app/src/commonMain/composeResources/values-nl-rNL/strings.xml diff --git a/app/src/androidMain/res/values-no-rNO/strings.xml b/app/src/commonMain/composeResources/values-no-rNO/strings.xml similarity index 100% rename from app/src/androidMain/res/values-no-rNO/strings.xml rename to app/src/commonMain/composeResources/values-no-rNO/strings.xml diff --git a/app/src/androidMain/res/values-pl-rPL/strings.xml b/app/src/commonMain/composeResources/values-pl-rPL/strings.xml similarity index 100% rename from app/src/androidMain/res/values-pl-rPL/strings.xml rename to app/src/commonMain/composeResources/values-pl-rPL/strings.xml diff --git a/app/src/androidMain/res/values-pt-rBR/strings.xml b/app/src/commonMain/composeResources/values-pt-rBR/strings.xml similarity index 100% rename from app/src/androidMain/res/values-pt-rBR/strings.xml rename to app/src/commonMain/composeResources/values-pt-rBR/strings.xml diff --git a/app/src/androidMain/res/values-pt-rPT/strings.xml b/app/src/commonMain/composeResources/values-pt-rPT/strings.xml similarity index 100% rename from app/src/androidMain/res/values-pt-rPT/strings.xml rename to app/src/commonMain/composeResources/values-pt-rPT/strings.xml diff --git a/app/src/androidMain/res/values-ro-rRO/strings.xml b/app/src/commonMain/composeResources/values-ro-rRO/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ro-rRO/strings.xml rename to app/src/commonMain/composeResources/values-ro-rRO/strings.xml diff --git a/app/src/androidMain/res/values-ru-rRU/strings.xml b/app/src/commonMain/composeResources/values-ru-rRU/strings.xml similarity index 100% rename from app/src/androidMain/res/values-ru-rRU/strings.xml rename to app/src/commonMain/composeResources/values-ru-rRU/strings.xml diff --git a/app/src/androidMain/res/values-sr-rSP/strings.xml b/app/src/commonMain/composeResources/values-sr-rSP/strings.xml similarity index 100% rename from app/src/androidMain/res/values-sr-rSP/strings.xml rename to app/src/commonMain/composeResources/values-sr-rSP/strings.xml diff --git a/app/src/androidMain/res/values-sv-rSE/strings.xml b/app/src/commonMain/composeResources/values-sv-rSE/strings.xml similarity index 100% rename from app/src/androidMain/res/values-sv-rSE/strings.xml rename to app/src/commonMain/composeResources/values-sv-rSE/strings.xml diff --git a/app/src/androidMain/res/values-tlh-rAA/strings.xml b/app/src/commonMain/composeResources/values-tlh-rAA/strings.xml similarity index 100% rename from app/src/androidMain/res/values-tlh-rAA/strings.xml rename to app/src/commonMain/composeResources/values-tlh-rAA/strings.xml diff --git a/app/src/androidMain/res/values-tr-rTR/strings.xml b/app/src/commonMain/composeResources/values-tr-rTR/strings.xml similarity index 100% rename from app/src/androidMain/res/values-tr-rTR/strings.xml rename to app/src/commonMain/composeResources/values-tr-rTR/strings.xml diff --git a/app/src/androidMain/res/values-uk-rUA/strings.xml b/app/src/commonMain/composeResources/values-uk-rUA/strings.xml similarity index 100% rename from app/src/androidMain/res/values-uk-rUA/strings.xml rename to app/src/commonMain/composeResources/values-uk-rUA/strings.xml diff --git a/app/src/androidMain/res/values-vi-rVN/strings.xml b/app/src/commonMain/composeResources/values-vi-rVN/strings.xml similarity index 100% rename from app/src/androidMain/res/values-vi-rVN/strings.xml rename to app/src/commonMain/composeResources/values-vi-rVN/strings.xml diff --git a/app/src/androidMain/res/values-zh-rCN/strings.xml b/app/src/commonMain/composeResources/values-zh-rCN/strings.xml similarity index 100% rename from app/src/androidMain/res/values-zh-rCN/strings.xml rename to app/src/commonMain/composeResources/values-zh-rCN/strings.xml diff --git a/app/src/androidMain/res/values-zh-rTW/strings.xml b/app/src/commonMain/composeResources/values-zh-rTW/strings.xml similarity index 100% rename from app/src/androidMain/res/values-zh-rTW/strings.xml rename to app/src/commonMain/composeResources/values-zh-rTW/strings.xml diff --git a/app/src/commonMain/composeResources/values/strings.xml b/app/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..216c2b45 --- /dev/null +++ b/app/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,220 @@ + + Pixelix + OK + Notifications + Settings + Liked Posts + Bookmarked Posts + Followed Hashtags + Blocked Profiles + Muted Profiles + Logout + Open in browser + Share this profile + Block this profile + Unblock this profile + Mute this profile + Unmute this profile + Load More + Follow + Unfollow + Followers + Following + Posts + Hashtags + reblogged your post + liked your post + followed you + Share this post + Trending + Profiles + Rules + Instance version + Terms of use + Privacy Policy + Admin + Users + Stats + unblock + Unblock + Unblock Profile? + Confirm to unblock this profile + no blocked profiles + Cancel + Post by + Liked by + Delete this post + Delete post? + This action cannot be undone + Delete + This is the End! + and + Followed by + other + others + yearly + monthly + daily + I don't have a profile + Server URL + Are you sure you want to log out? + Logout? + View %1$s comments + Leave a comment + No comments yet + No likes yet + no liked posts + Local + Global + Home + %1$s likes + Search + Unmute + unmute + Media Description + No posts yet + mentioned you + No bookmarked posts + Nothing to show + New post + Publish + Alt Text + caption + Sensitive/NSFW Media + content warning or spoiler text + Audience + unlisted + followers only + public + No followed hashtags + No muted profiles + Visibility: %1$s + Clear cache + Preferences + Hide sensitive content + About %1$s + More settings + Use in-app-browser + No trending profiles + No trending Hashtags + No trending posts + Upload your first post + The profiles you follow will appear here + Explore trending profiles + Nobody follows you yet + Empty + Follow profiles or hashtags to fill your home timeline + No posts + The Home timeline shows you posts from people and hashtags that you follow + The Local timeline shows posts from all users in your server + The Global timeline shows posts from all users in all servers your server federates with + This user has not postet anything yet + You don't have any notifications + view more + Edit Profile + Save + Delete reply + Reply + Post + Pixelfed is a photo and image sharing network on the Fediverse with a photo-oriented interface that includes albums, filters, moments etc. + Mastodon is a free and open source microblogging platform + PeerTube is a tool for sharing online videos developed by Framasoft, a french non-profit. + Lemmy is a selfhosted social link aggregation and discussion platform. It is completely free and open, and not controlled by any company. This means that there is no advertising, tracking, or secret algorithms. Content is organized into communities, so it is easy to subscribe to topics that you are interested in, and ignore others. Voting is used to bring the most interesting items to the top. + Threads is an app from Meta where you can view and share public conversations. You can also post threads, reply to others and follow profiles you are interested in. + More information + What makes a post trend? + Posts trend if they were posted during the selected timeframe and have many likes. + The trending profiles section lists the profiles on your instance with the most followers. The profiles you already follow are hidden. + What makes an profile trend? + What makes a hashtag trend? + Hashtags trend if many people have used them recently. + Private profile + • You won’t see the user in your home feed + • You won’t see other people boosting the user + • You won’t see other people mentioning the user + • You won’t see the user in public timelines + The user has no way of knowing they have been muted. + • You won’t see the user in your home feed + • You won’t see other people boosting the user + • You won’t see other people mentioning the user + • You won’t see the user in public timelines + • You won’t see notifications from that user + • The user is forced to unfollow you + • The user cannot follow you + • The user won’t see other people’s boosts of you + • The user won’t see you in public timelines + If you and the blocked user are on the same server, the blocked user will not be able to view your posts on your profile while logged in. + Block + Block profile? + Unmute Profile? + Mute + Mute Profile? + sent a dm + system + dark + light + App theme + Send message + Select recipient + New Direct Message + Warning + "Direct messages on Pixelfed are not end-to-end encrypted. Use caution when sharing sensitive data. " + Confirm + This is the beginning of your chat with this user. Don't forget to be respectful. + Rate us + About Pixelix + Developed by + Conversations + Share this collection + By %1$s + New Collection + Creating collections is not yet supported in the pixelfed api, but a new collection can be created in the pixelfed web app: + New + Collections + Follows you + muted + blocked + Message + All + Likes + Reposts + Edit this post + Stay updated with your latest notifications from Pixelfed right on your home screen + Customize app icon + Change app icon? + It may take a while until the new icon is shown. + Change + mentioned you + have a look at the newest post from your home timeline, right on your homescreen + If an icon other than the default icon is selected, two icons will be displayed in your apps drawer. + Current Profile: + Other Profiles: + Add Pixelfed profile + Download image + Profile + Inbox + Are you sure you want to remove this Profile? + Remove Profile? + Remove + Are you sure, you want to update this post? + Mutual followers + License: %1$s + Hide Alt-text button + Instances: + Total posts: + Total users: + Active users: + %1$s version %2$s + Visit %1$s + Displayname + Bio + Website + Location + Mentions + Explore + reblogged by %1$s + Focus Mode + Hides description, likes and buttons from posts. + Repost settings + AMOLED + diff --git a/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/model/nodeinfo/FediSoftware.kt b/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/model/nodeinfo/FediSoftware.kt index 03e21f09..31769caf 100644 --- a/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/model/nodeinfo/FediSoftware.kt +++ b/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/model/nodeinfo/FediSoftware.kt @@ -1,5 +1,7 @@ package com.daniebeler.pfpixelix.domain.model.nodeinfo +import org.jetbrains.compose.resources.DrawableResource + data class FediSoftware( val description: String, val id: Int, @@ -10,6 +12,6 @@ data class FediSoftware( val statusCount: Int, val userCount: Int, val activeUserCount: Int, - var icon: Int?, //todo KMP + var icon: DrawableResource?, val website: String ) \ No newline at end of file diff --git a/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.kt b/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.kt index 2215b286..9a1f34ee 100644 --- a/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.kt +++ b/app/src/commonMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.kt @@ -1,12 +1,43 @@ package com.daniebeler.pfpixelix.domain.usecase.nodeinfo +import co.touchlab.kermit.Logger import com.daniebeler.pfpixelix.common.Resource import com.daniebeler.pfpixelix.domain.model.nodeinfo.FediSoftware import com.daniebeler.pfpixelix.domain.repository.CountryRepository import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.flow import me.tatarka.inject.annotations.Inject +import pixelix.app.generated.resources.Res +import pixelix.app.generated.resources.fediverse_logo +import pixelix.app.generated.resources.lemmy_logo +import pixelix.app.generated.resources.mastodon_logo +import pixelix.app.generated.resources.misskey_logo +import pixelix.app.generated.resources.peertube_logo +import pixelix.app.generated.resources.pixelfed_logo @Inject -expect class GetFediSoftwareUseCase(countryRepository: CountryRepository) { - operator fun invoke(domain: String): Flow> +class GetFediSoftwareUseCase( + private val countryRepository: CountryRepository +) { + operator fun invoke(domain: String): Flow> = flow { + emit(Resource.Loading()) + countryRepository.getSoftwareFromFediDB(domain).collect { res -> + if (res is Resource.Error) { + Logger.d { "fief fief" } + emit(Resource.Error(res.message!!)) + } + if (res is Resource.Success) { + Logger.d { "fief" } + res.data!!.icon = when (res.data.slug) { + "pixelfed" -> Res.drawable.pixelfed_logo + "mastodon" -> Res.drawable.mastodon_logo + "peertube" -> Res.drawable.peertube_logo + "lemmy" -> Res.drawable.lemmy_logo + "misskey" -> Res.drawable.misskey_logo + else -> Res.drawable.fediverse_logo + } + emit(res) + } + } + } } diff --git a/app/src/iosMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.ios.kt b/app/src/iosMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.ios.kt deleted file mode 100644 index bbaf56a3..00000000 --- a/app/src/iosMain/kotlin/com/daniebeler/pfpixelix/domain/usecase/nodeinfo/GetFediSoftwareUseCase.ios.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.daniebeler.pfpixelix.domain.usecase.nodeinfo - -import com.daniebeler.pfpixelix.common.Resource -import com.daniebeler.pfpixelix.domain.model.nodeinfo.FediSoftware -import com.daniebeler.pfpixelix.domain.repository.CountryRepository -import kotlinx.coroutines.flow.Flow -import me.tatarka.inject.annotations.Inject - -@Inject -actual class GetFediSoftwareUseCase actual constructor(countryRepository: CountryRepository) { - actual operator fun invoke(domain: String): Flow> { - TODO("Not yet implemented") - } -} \ No newline at end of file