mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 12:07:03 +05:30
common/app: add Settings UI composables
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
a08109d745
commit
ef09b241ea
6 changed files with 176 additions and 1 deletions
|
@ -11,13 +11,18 @@ private fun stringEnumMapper(stringEnum: Strings): Int {
|
|||
Strings.AvatarContentDescription -> R.string.avatar_content_description
|
||||
Strings.ChangeSortingOrder -> R.string.change_sorting_order
|
||||
Strings.HottestPosts -> R.string.hottest_posts
|
||||
Strings.NewestPosts -> R.string.newest_posts
|
||||
Strings.NoSavedPost -> R.string.no_saved_posts
|
||||
Strings.OpenComments -> R.string.open_comments
|
||||
Strings.RefreshPostsContentDescription -> R.string.refresh_posts_content_description
|
||||
Strings.RemoveFromSavedPosts -> R.string.remove_from_saved_posts
|
||||
Strings.SavedPosts -> R.string.saved_posts
|
||||
Strings.SubmittedBy -> R.string.submitted_by
|
||||
Strings.NewestPosts -> R.string.newest_posts
|
||||
Strings.Settings -> R.string.settings
|
||||
Strings.SettingsBackup -> R.string.settings_backup
|
||||
Strings.SettingsBackupDescription -> R.string.settings_backup_desc
|
||||
Strings.SettingsRestore -> R.string.settings_restore
|
||||
Strings.SettingsRestoreDescription -> R.string.settings_restore_desc
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,4 +11,9 @@
|
|||
<string name="open_comments">Open comments</string>
|
||||
<string name="change_sorting_order">Change sort order</string>
|
||||
<string name="newest_posts">Newest</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="settings_backup">Backup saved posts</string>
|
||||
<string name="settings_backup_desc">Export saved posts in a JSON file that can be restored later</string>
|
||||
<string name="settings_restore">Restore saved posts</string>
|
||||
<string name="settings_restore_desc">Import a previously exported copy of saved posts. Existing saved posts are not cleared</string>
|
||||
</resources>
|
||||
|
|
|
@ -13,4 +13,9 @@ enum class Strings {
|
|||
SavedPosts,
|
||||
SubmittedBy,
|
||||
NewestPosts,
|
||||
Settings,
|
||||
SettingsBackup,
|
||||
SettingsBackupDescription,
|
||||
SettingsRestore,
|
||||
SettingsRestoreDescription,
|
||||
}
|
||||
|
|
|
@ -16,6 +16,13 @@ private fun stringEnumMapper(stringEnum: Strings): String {
|
|||
Strings.SavedPosts -> "Saved"
|
||||
Strings.SubmittedBy -> "submitted by %1s"
|
||||
Strings.NewestPosts -> "Newest"
|
||||
Strings.Settings -> "Settings"
|
||||
Strings.SettingsBackup -> "Backup saved posts"
|
||||
Strings.SettingsBackupDescription ->
|
||||
"Export saved posts in a JSON file that can be restored later"
|
||||
Strings.SettingsRestore -> "Restore saved posts"
|
||||
Strings.SettingsRestoreDescription ->
|
||||
"Import a previously exported copy of saved posts. Existing saved posts are not cleared"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue