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:
Aditya Wasan 2021-04-02 13:36:41 +05:30 committed by Harsh Shandilya
parent a08109d745
commit ef09b241ea
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
6 changed files with 176 additions and 1 deletions

View file

@ -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
}
}

View file

@ -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>

View file

@ -13,4 +13,9 @@ enum class Strings {
SavedPosts,
SubmittedBy,
NewestPosts,
Settings,
SettingsBackup,
SettingsBackupDescription,
SettingsRestore,
SettingsRestoreDescription,
}

View file

@ -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"
}
}