Skip to content

Commit 62ced64

Browse files
committed
Issue 1556: Further refactoring.
1 parent 64b3106 commit 62ced64

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

app/src/main/java/dev/dimension/flare/ui/screen/settings/AppearanceScreen.kt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,32 @@ internal fun AppearanceScreen(
536536
)
537537
},
538538
)
539+
AnimatedVisibility(visible = appearanceSettings.showLinkPreview) {
540+
SegmentedListItem(
541+
onClick = {
542+
state.updateSettings {
543+
copy(compatLinkPreview = !compatLinkPreview)
544+
}
545+
},
546+
shapes = ListItemDefaults.item(),
547+
content = {
548+
Text(text = stringResource(id = R.string.settings_appearance_compat_link_previews))
549+
},
550+
supportingContent = {
551+
Text(text = stringResource(id = R.string.settings_appearance_compat_link_previews_description))
552+
},
553+
trailingContent = {
554+
Switch(
555+
checked = appearanceSettings.compatLinkPreview,
556+
onCheckedChange = {
557+
state.updateSettings {
558+
copy(compatLinkPreview = it)
559+
}
560+
},
561+
)
562+
},
563+
)
564+
}
539565
SegmentedListItem(
540566
onClick = {
541567
state.updateSettings {

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@
177177
<string name="settings_appearance_compat_link_previews">Simplify link previews</string>
178178
<string name="settings_appearance_compat_link_previews_description">Show link previews in simplify mode in the post</string>
179179
<string name="settings_appearance_hide_reposts">Hide reposts</string>
180-
<string name="settings_appearance_hide_reposts_description">When enabled, reposts (retweets/renotes) are removed from timelines</string>
180+
<string name="settings_appearance_hide_reposts_description">When enabled, reposts (retweets/reblogs) are removed from timelines</string>
181181
<string name="settings_appearance_hide_replies">Hide replies</string>
182-
<string name="settings_appearance_hide_replies_description">When enabled, replies by others are removed from timelines (keeps your own replies)</string>
182+
<string name="settings_appearance_hide_replies_description">When enabled, replies by others to anyone other than themselves are removed from timelines</string>
183183
<string name="settings_appearance_theme_color">Theme color</string>
184184
<string name="settings_appearance_theme_color_description">Change the theme color of the app</string>
185185
<string name="settings_appearance_theme_pure_color">High contrast Mode</string>

compose-ui/src/commonMain/composeResources/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
<string name="settings_about_localization_description">Help us translate Flare</string>
492492
<string name="settings_privacy_policy">Privacy Policy</string>
493493
<string name="settings_appearance_hide_reposts">Hide reposts</string>
494-
<string name="settings_appearance_hide_reposts_description">Remove reposts from timelines (keeps quoted posts and search results)</string>
494+
<string name="settings_appearance_hide_reposts_description">When enabled, reposts (retweets/reblogs) are removed from timelines</string>
495495
<string name="settings_appearance_hide_replies">Hide replies</string>
496-
<string name="settings_appearance_hide_replies_description">When enabled, replies by others are removed from timelines (keeps your own replies)</string>
496+
<string name="settings_appearance_hide_replies_description">When enabled, replies by others to anyone other than themselves are removed from timelines</string>
497497
</resources>

0 commit comments

Comments
 (0)