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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object EventNames {
const val SNACKBAR = "snackbar"

object Type {
const val HELP = "help"
const val FEEDBACK = "feedback"
const val COFFEE = "coffee"
const val OSS = "oss"
const val URL = "url"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import tt.co.jesses.moonlight.android.view.util.Constants
import tt.co.jesses.moonlight.android.view.util.Constants.basePadding
import tt.co.jesses.moonlight.android.view.util.Constants.bodyFontSize
import tt.co.jesses.moonlight.android.view.util.Constants.headerFontSize
import tt.co.jesses.moonlight.android.view.util.EmailUtil.composeEmail
import tt.co.jesses.moonlight.android.view.util.GradientUtil
import tt.co.jesses.moonlight.android.view.util.VersionUtil
import tt.co.jesses.moonlight.android.view.util.angledGradientBackground
Expand All @@ -70,10 +69,9 @@ fun AboutScreen(

val versionInfo = VersionUtil.getVersionName(context = context)

val helpMessage = stringResource(R.string.credits_info_help_message)
val helpAction = stringResource(R.string.credits_info_help_action)
val helpEmailAddress = stringResource(R.string.credits_info_help_action_email_address)
val helpEmailSubject = stringResource(R.string.credits_info_help_action_email_subject)
val feedbackMessage = stringResource(R.string.credits_info_feedback_message)
val feedbackAction = stringResource(R.string.credits_info_feedback_action)
val feedbackUrl = stringResource(R.string.credits_info_feedback_action_url)

val supportMessage = stringResource(R.string.credits_info_coffee_message)
val supportAction = stringResource(R.string.credits_info_coffee_action)
Expand Down Expand Up @@ -242,27 +240,23 @@ fun AboutScreen(
onClick = {
coroutineScope.launch {
val snackbarResult = scaffoldState.snackbarHostState.showSnackbar(
message = helpMessage,
actionLabel = helpAction,
message = feedbackMessage,
actionLabel = feedbackAction,
).also {
logger.logEvent(
eventName = EventNames.Action.SNACKBAR,
params = mapOf(
EventNames.Action.Type.HELP to EventNames.Action.Params.SNACKBAR_SHOWN
EventNames.Action.Type.FEEDBACK to EventNames.Action.Params.SNACKBAR_SHOWN
),
)
}
when (snackbarResult) {
SnackbarResult.ActionPerformed -> {
composeEmail(
addresses = arrayOf(helpEmailAddress),
subject = helpEmailSubject,
context = context
)
context.launchCustomTabs(url = feedbackUrl)
logger.logEvent(
eventName = EventNames.Action.SNACKBAR,
params = mapOf(
EventNames.Action.Type.HELP to EventNames.Action.Params.BUTTON_CLICK
EventNames.Action.Type.FEEDBACK to EventNames.Action.Params.BUTTON_CLICK
),
)
}
Expand All @@ -273,7 +267,7 @@ fun AboutScreen(
border = borderStroke,
) {
Text(
text = stringResource(R.string.credits_info_help),
text = stringResource(R.string.credits_info_feedback),
fontSize = bodyFontSize,
style = textStyle,
)
Expand Down

This file was deleted.

9 changes: 4 additions & 5 deletions app/androidApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@

<string name="credits_info_version">Version %s</string>

<string name="credits_info_help">Help</string>
<string name="credits_info_help_message">Send me an email if you have feedback, questions, or concerns!</string>
<string name="credits_info_help_action">email</string>
<string name="credits_info_help_action_email_address">js@jesses.co.tt</string>
<string name="credits_info_help_action_email_subject">Feedback from the moonlight app</string>
<string name="credits_info_feedback">Feedback</string>
<string name="credits_info_feedback_message">Send me your feedback, questions, or concerns!</string>
<string name="credits_info_feedback_action">submit</string>
<string name="credits_info_feedback_action_url">https://workable-zydeco-5d0.notion.site/3171a41696ff80fdb7a8d43084bb74cb?pvs=105</string>

<string name="credits_info_coffee">Buy me a coffee</string>
<string name="credits_info_coffee_message">This project is a labour of love. If you are able and willing to support my work, please buy me a coffee</string>
Expand Down
2 changes: 1 addition & 1 deletion app/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ org.gradle.configureondemand=true
# When configured, Gradle will run in incubating parallel mode
org.gradle.parallel=true

# Enables Gradle Virtual File System which can speedup build times
# Enables Gradle Virtual File System which can speed up build times
org.gradle.vfs.watch=true

# Enables Gradle Configuration Cache - https://docs.gradle.org/current/userguide/configuration_cache.html
Expand Down