Skip to content

Commit 65d26aa

Browse files
committed
Add drawer sheet item explanations
1 parent d16ce47 commit 65d26aa

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

app/src/main/kotlin/com/w2sv/filenavigator/ui/designsystem/drawer/NavigationDrawerSheetItemColumn.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,17 @@ internal fun NavigationDrawerSheetItemColumn(
122122
NavigationDrawerSheetElement.Item(
123123
iconRes = R.drawable.ic_share_24,
124124
labelRes = R.string.share,
125+
explanationRes = R.string.share_action_explanation,
125126
type = NavigationDrawerSheetElement.Item.Type.Clickable {
126127
ShareCompat.IntentBuilder(context)
127128
.setType("text/plain")
128-
.setText(context.getString(R.string.share_action_text))
129+
.setText(context.getString(R.string.share_action_text, AppUrl.PLAYSTORE_LISTING))
129130
.startChooser()
130131
}
131132
),
132133
NavigationDrawerSheetElement.Item(
133134
iconRes = R.drawable.ic_bug_report_24,
135+
explanationRes = R.string.report_a_bug_request_a_feature_explanation,
134136
labelRes = R.string.report_a_bug_request_a_feature,
135137
type = NavigationDrawerSheetElement.Item.Type.Clickable {
136138
context.openUrl(AppUrl.CREATE_ISSUE)
@@ -214,7 +216,8 @@ private sealed interface NavigationDrawerSheetElement {
214216
@Immutable
215217
sealed interface Type {
216218
@Immutable
217-
data class Clickable(val onClick: () -> Unit) : Type
219+
@JvmInline
220+
value class Clickable(val onClick: () -> Unit) : Type
218221

219222
@Immutable
220223
data class Switch(

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<string name="share">Share</string>
2222
<string name="rate">Rate</string>
2323
<string name="privacy_policy">Privacy Policy</string>
24-
<string name="share_action_text">Check out File Navigator! https://play.google.com/store/apps/details?id=com.w2sv.filenavigator</string>
24+
<string name="share_action_text">Check out File Navigator!\n%s</string>
2525
<string name="you_re_not_signed_into_the_play_store">You\'re not signed into the Play Store</string>
2626
<string name="version">Version: %s</string>
2727
<string name="appearance">Appearance</string>
@@ -78,8 +78,10 @@
7878
<string name="batch_move_notification">Batch-move notification</string>
7979
<string name="batch_move_explanation">Upon at least 2 active navigation notifications, show a notification through which all navigatable files may be collectively moved to a destination</string>
8080
<string name="provider_does_not_support_file_viewing">Provider doesn\'t support file viewing.</string>
81+
<string name="share_action_explanation">Share the app with someone who might appreciate it</string>
82+
<string name="report_a_bug_request_a_feature_explanation">Help make the app better!</string>
8183
<plurals name="add_file_types_button">
8284
<item quantity="one">Add File Type</item>
8385
<item quantity="other">Add File Types</item>
8486
</plurals>
85-
</resources>
87+
</resources>

core/common/src/main/kotlin/com/w2sv/common/AppUrl.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ object AppUrl {
88
const val GOOGLE_PLAY_DEVELOPER_PAGE =
99
"https://play.google.com/store/apps/dev?id=6884111703871536890"
1010
const val DONATE = "https://buymeacoffee.com/w2sv"
11+
const val PLAYSTORE_LISTING = "https://play.google.com/store/apps/details?id=com.w2sv.filenavigator"
1112
}

0 commit comments

Comments
 (0)