Added notification action to skipped ("learn why")

Just opens the same url thats opened by tapping it
And changing string in the log to say "learn more - url", to not have a similar string of "learn why at: "
This commit is contained in:
Jays2Kings 2022-05-04 17:01:00 -04:00
parent cc4c8923d7
commit 129b34f119
3 changed files with 7 additions and 2 deletions

View file

@ -149,6 +149,11 @@ class LibraryUpdateNotifier(private val context: Context) {
context.getString(R.string.open_log),
NotificationReceiver.openErrorOrSkippedLogPendingActivity(context, uri),
)
addAction(
R.drawable.ic_help_outline_24dp,
context.getString(R.string.learn_why),
NotificationHandler.openUrl(context, HELP_SKIPPED_URL),
)
}
.build(),
)

View file

@ -372,7 +372,7 @@ class LibraryUpdateService(
val skippedFile = writeErrorFile(
skippedUpdates,
"skipped",
getString(R.string.learn_more_at_, LibraryUpdateNotifier.HELP_SKIPPED_URL),
getString(R.string.learn_why) + " - " + LibraryUpdateNotifier.HELP_SKIPPED_URL,
).getUriCompat(this)
notifier.showUpdateSkippedNotification(skippedUpdates.map { it.key.title }, skippedFile)
}

View file

@ -1020,7 +1020,7 @@
<string name="install">Install</string>
<string name="keep">Keep</string>
<string name="keep_in_">Keep in %1$s</string>
<string name="learn_more_at_">Learn more at: %1$s</string>
<string name="learn_why">Learn why</string>
<string name="left">Left</string>
<string name="less">Less</string>
<string name="loading">Loading…</string>