1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 04:22:30 +01:00

Also show a toast on error notification

since the notification is silent, also show a toast, otherwise the user is confused
This commit is contained in:
Stypox 2021-12-04 10:45:15 +01:00
parent c000c1d455
commit 950956ebf2
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.view.View
import android.widget.Toast
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
@ -87,6 +88,10 @@ class ErrorUtil {
)
notificationManager!!.notify(ERROR_REPORT_NOTIFICATION_ID, notificationBuilder.build())
// since the notification is silent, also show a toast, otherwise the user is confused
Toast.makeText(context, R.string.error_report_notification_toast, Toast.LENGTH_SHORT)
.show()
}
private fun getErrorActivityIntent(context: Context, errorInfo: ErrorInfo): Intent {

View File

@ -245,6 +245,7 @@
<string name="permission_display_over_apps">Give permission to display over other apps</string>
<!-- error activity -->
<string name="error_report_notification_title">NewPipe encountered an error, tap to report</string>
<string name="error_report_notification_toast">An error occurred, see the notification</string>
<string name="sorry_string">Sorry, that should not have happened.</string>
<string name="guru_meditation" translatable="false">Guru Meditation.</string>
<string name="error_report_button_text">Report this error via e-mail</string>