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:
parent
c000c1d455
commit
950956ebf2
@ -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 {
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user