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 {