mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-05 10:49:26 +02:00
Allow ErrorInfo messages with formatArgs
- ErrorInfo.getMessage() now returns an ErrorMessage instance that can be formatted into a string using a context (this allows the construction of an ErrorInfo to remain independent of a Context) - now the service ID is used in ErrorInfo.getMessage() to customize some messages based on the currently selected service - player HTTP invalid statuses are now included in the message - building a custom error message for AccountTerminatedException was moved from ErrorPanelHelper to ErrorInfo
This commit is contained in:
parent
1bde2dcd9f
commit
a369deeef4
72 changed files with 154 additions and 146 deletions
|
@ -276,7 +276,7 @@ public class RouterActivity extends AppCompatActivity {
|
|||
|| errorInfo.getThrowable() instanceof ContentNotSupportedException) {
|
||||
// this exception does not usually indicate a problem that should be reported,
|
||||
// so just show a toast instead of the notification
|
||||
Toast.makeText(context, errorInfo.getMessageStringId(), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, errorInfo.getMessage(context), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
ErrorUtil.createNotification(context, errorInfo);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue