Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/src/main/java/dev/dimension/flare/ui/route/Route.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ internal sealed interface Route : NavKey {
@Serializable
data object LocalFilter : Settings

@Serializable
data object GuestSetting : Settings

@Serializable
data object LocalHistory : Settings

Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import compose.icons.fontawesomeicons.solid.ClockRotateLeft
import compose.icons.fontawesomeicons.solid.Database
import compose.icons.fontawesomeicons.solid.Filter
import compose.icons.fontawesomeicons.solid.Gear
import compose.icons.fontawesomeicons.solid.Globe
import compose.icons.fontawesomeicons.solid.Language
import compose.icons.fontawesomeicons.solid.Palette
import compose.icons.fontawesomeicons.solid.PenToSquare
Expand Down Expand Up @@ -97,7 +96,6 @@ internal fun SettingsScreen(
toColorSpace: () -> Unit,
toTabCustomization: () -> Unit,
toLocalFilter: () -> Unit,
toGuestSettings: () -> Unit,
toLocalHistory: () -> Unit,
toDraftBox: () -> Unit,
toAiConfig: () -> Unit,
Expand Down Expand Up @@ -168,29 +166,6 @@ internal fun SettingsScreen(
},
)
}

state.user
.onError {
SegmentedListItem(
onClick = {
toGuestSettings.invoke()
},
shapes = ListItemDefaults.single(),
content = {
Text(text = stringResource(id = R.string.settings_guest_setting_title))
},
leadingContent = {
ThemedIcon(
imageVector = FontAwesomeIcons.Solid.Globe,
contentDescription = stringResource(id = R.string.settings_guest_setting_title),
color = ThemeIconData.Color.SapphireBlue,
)
},
supportingContent = {
Text(text = stringResource(id = R.string.settings_guest_setting_description))
},
)
}
Column(
verticalArrangement = Arrangement.spacedBy(ListItemDefaults.SegmentedGap),
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ internal fun EntryProviderScope<NavKey>.settingsSelectEntryBuilder(
toLocalFilter = {
navigate(Route.Settings.LocalFilter)
},
toGuestSettings = {
navigate(Route.Settings.GuestSetting)
},
toLocalHistory = {
navigate(Route.Settings.LocalHistory)
},
Expand Down Expand Up @@ -142,14 +139,6 @@ internal fun EntryProviderScope<NavKey>.settingsSelectEntryBuilder(
)
}

entry<Route.Settings.GuestSetting>(
metadata = DialogSceneStrategy.dialog()
) {
GuestSettingScreen(
onBack = onBack
)
}

entry<Route.Settings.LocalHistory>(
metadata = ListDetailSceneStrategy.detailPane(
sceneKey = "Settings"
Expand Down
21 changes: 13 additions & 8 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
<string name="settings_ai_config_translate_provider_google">Google Translate</string>
<string name="settings_language_title">Language</string>
<string name="settings_language_description">Change the language of the app</string>
<string name="settings_rss_management_title">RSS Management</string>
<string name="settings_rss_management_description">Manage RSS feeds</string>
<string name="settings_rss_management_title">Subscription Management</string>
<string name="settings_rss_management_description">Manage subscriptions</string>
<string name="settings_nostr_relays_manage">Manage relays</string>
<string name="settings_nostr_relays_add">Add relay</string>
<string name="settings_nostr_relays_add_dialog_title">Add relay</string>
Expand Down Expand Up @@ -374,24 +374,29 @@
<string name="local_history_search_status_title">Post</string>
<string name="local_history_search_user_title">User</string>

<string name="rss_sources_title">RSS Sources</string>
<string name="add_rss_source">Add RSS Source</string>
<string name="edit_rss_source">Edit RSS Source</string>
<string name="delete_rss_source">Delete RSS Source</string>
<string name="rss_sources_title">Subscriptions</string>
<string name="add_rss_source">Add Subscription</string>
<string name="edit_rss_source">Edit Subscription</string>
<string name="delete_rss_source">Delete Subscription</string>
<string name="opml_import">Import from OPML</string>
<string name="opml_export">Export to OPML</string>
<string name="export_completed">Export completed</string>

<string name="rss_sources_title_label">Title</string>
<string name="rss_sources_url_label">Url</string>
<string name="rss_title">RSS</string>
<string name="empty_rss_sources">No RSS sources</string>
<string name="rss_title">Subscriptions</string>
<string name="empty_rss_sources">No subscriptions</string>
<string name="rss_sources_rss_hub_host_label">RSSHub Host</string>
<string name="rss_sources_rss_hub_host_hint">You need to set the RSSHub host if you want to use RSSHub, or select the public RSSHub server</string>
<string name="rss_sources_discovered_rss_sources">Discovered RSS Sources</string>
<string name="rss_sources_pinned_in_tabs">Pin to home tabs</string>
<string name="rss_sources_open_in_browser">Open in browser</string>
<string name="rss_sources_open_in_app">Open in app</string>
<string name="mastodon_available_timelines">Available timelines</string>
<string name="mastodon_trending_statuses">Trending statuses</string>
<string name="mastodon_federated_timeline">Federated timeline</string>
<string name="mastodon_local_timeline">Local timeline</string>
<string name="subscription_url_hint">Supports RSS feeds and Mastodon instances</string>

<string name="rss_detail_open_in_browser">Open in browser</string>
<string name="rss_detail_share">Share link</string>
Expand Down
17 changes: 10 additions & 7 deletions compose-ui/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,18 @@
<string name="list_edit">Edit list</string>
<string name="list_delete">Delete list</string>

<string name="rss_sources_title">Rss Sources</string>
<string name="add_rss_source">Add Rss Source</string>
<string name="edit_rss_source">Edit Rss Source</string>
<string name="delete_rss_source">Delete Rss Source</string>
<string name="rss_sources_title">Subscriptions</string>
<string name="add_rss_source">Add Subscription</string>
<string name="edit_rss_source">Edit Subscription</string>
<string name="delete_rss_source">Delete Subscription</string>

<string name="rss_sources_title_label">Title</string>
<string name="rss_sources_url_label">Url</string>
<string name="rss_title">Rss</string>
<string name="empty_rss_sources">No rss sources</string>
<string name="rss_title">Subscriptions</string>
<string name="empty_rss_sources">No subscriptions</string>
<string name="mastodon_trending_statuses">Trending statuses</string>
<string name="mastodon_federated_timeline">Federated timeline</string>
<string name="mastodon_local_timeline">Local timeline</string>

<string name="service_select_welcome_title">Welcome to Flare</string>
<string name="service_select_welcome_message">Please input the server to get started.</string>
Expand Down Expand Up @@ -489,7 +492,7 @@
<string name="antenna_title">Antenna</string>
<string name="mixed_timeline_title">Mixed</string>
<string name="liked_title">Liked</string>
<string name="all_rss_feeds_title">All Rss Feeds</string>
<string name="all_rss_feeds_title">All Subscriptions</string>
<string name="posts_title">Posts</string>
<string name="settings_appearance_absolute_timestamp">Absolute timestamp</string>
<string name="settings_appearance_absolute_timestamp_description">Display absolute timestamps on posts</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ import dev.dimension.flare.compose.ui.Res
import dev.dimension.flare.compose.ui.delete_rss_source
import dev.dimension.flare.compose.ui.edit_rss_source
import dev.dimension.flare.compose.ui.empty_rss_sources
import dev.dimension.flare.compose.ui.mastodon_federated_timeline
import dev.dimension.flare.compose.ui.mastodon_local_timeline
import dev.dimension.flare.compose.ui.mastodon_trending_statuses
import dev.dimension.flare.compose.ui.more
import dev.dimension.flare.compose.ui.tab_settings_add
import dev.dimension.flare.compose.ui.tab_settings_remove
import dev.dimension.flare.data.database.app.model.SubscriptionType
import dev.dimension.flare.ui.component.FAIcon
import dev.dimension.flare.ui.component.NetworkImage
import dev.dimension.flare.ui.component.platform.PlatformDropdownMenu
Expand Down Expand Up @@ -89,7 +93,14 @@ public fun LazyListScope.rssListWithTabs(
}
},
supportingContent = {
PlatformText(it.url)
val displayUrl =
when (it.type) {
SubscriptionType.RSS -> it.url
SubscriptionType.MASTODON_TRENDS -> "${it.url} - ${stringResource(Res.string.mastodon_trending_statuses)}"
SubscriptionType.MASTODON_PUBLIC -> "${it.url} - ${stringResource(Res.string.mastodon_federated_timeline)}"
SubscriptionType.MASTODON_LOCAL -> "${it.url} - ${stringResource(Res.string.mastodon_local_timeline)}"
}
PlatformText(displayUrl)
},
leadingContent = {
NetworkImage(
Expand All @@ -104,12 +115,18 @@ public fun LazyListScope.rssListWithTabs(
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
state.currentTabs.onSuccess { currentTabs ->
val pinKey =
if (it.type == SubscriptionType.RSS) {
it.url
} else {
"${it.type.name}:${it.url}"
}
val isPinned =
remember(
it,
currentTabs,
) {
currentTabs.contains(it.url)
currentTabs.contains(pinKey)
}
PlatformIconButton(
onClick = {
Expand Down
21 changes: 13 additions & 8 deletions desktopApp/src/main/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,24 @@
<string name="misskey_visibility_specified_description">Only mentioned users can see this post</string>


<string name="rss_sources_title">Rss Sources</string>
<string name="add_rss_source">Add Rss Source</string>
<string name="edit_rss_source">Edit Rss Source</string>
<string name="delete_rss_source">Delete Rss Source</string>
<string name="rss_sources_title">Subscriptions</string>
<string name="add_rss_source">Add Subscription</string>
<string name="edit_rss_source">Edit Subscription</string>
<string name="delete_rss_source">Delete Subscription</string>

<string name="rss_sources_title_label">Title</string>
<string name="rss_sources_url_label">Url</string>
<string name="rss_title">Rss</string>
<string name="empty_rss_sources">No rss sources</string>
<string name="rss_title">Subscriptions</string>
<string name="empty_rss_sources">No subscriptions</string>
<string name="rss_sources_rss_hub_host_label">RssHub Host</string>
<string name="rss_sources_rss_hub_host_hint">You need to set the RssHub host if you want to use RssHub, or select the public RssHub server</string>
<string name="rss_sources_discovered_rss_sources">Discovered Rss Sources</string>
<string name="rss_sources_pinned_in_tabs">Pin to home tabs</string>
<string name="mastodon_available_timelines">Available timelines</string>
<string name="mastodon_trending_statuses">Trending statuses</string>
<string name="mastodon_federated_timeline">Federated timeline</string>
<string name="mastodon_local_timeline">Local timeline</string>
<string name="subscription_url_hint">Supports RSS feeds and Mastodon instances</string>

<string name="tab_settings_add">Add</string>
<string name="tab_settings_drag">Drag</string>
Expand Down Expand Up @@ -357,8 +362,8 @@
<string name="settings_storage_clear_database_description">%1$s users, %2$s posts will be removed</string>
<string name="settings_storage_app_log">Open app log</string>
<string name="settings_storage_app_log_description">View the app log</string>
<string name="settings_rss_management_title">RSS Management</string>
<string name="settings_rss_management_description">Manage RSS feeds</string>
<string name="settings_rss_management_title">Subscription Management</string>
<string name="settings_rss_management_description">Manage subscriptions</string>
<string name="settings_nostr_relays_manage">Manage relays</string>
<string name="settings_nostr_relays_add">Add relay</string>
<string name="settings_nostr_relays_add_dialog_title">Add relay</string>
Expand Down
Loading
Loading