use snackbars instead of toasts (in most cases)

This commit is contained in:
Philipp Crocoll
2025-04-08 10:37:40 +02:00
parent e76f3999b6
commit 17241bc422
41 changed files with 1080 additions and 747 deletions

View File

@@ -392,7 +392,7 @@ namespace keepass2android
if (ioc.Path.Length == 0)
{
// No file name
Toast.MakeText(this, Resource.String.FileNotFound, ToastLength.Long).Show();
App.Kp2a.ShowMessage(this, Resource.String.FileNotFound, MessageSeverity.Error);
return false;
}
@@ -400,7 +400,7 @@ namespace keepass2android
if (!dbFile.Exists())
{
// File does not exist
Toast.MakeText(this, Resource.String.FileNotFound, ToastLength.Long).Show();
App.Kp2a.ShowMessage(this, Resource.String.FileNotFound, MessageSeverity.Error);
return false;
}
}
@@ -408,7 +408,7 @@ namespace keepass2android
{
if (!ioc.Path.StartsWith("content://"))
{
Toast.MakeText(this, Resource.String.error_can_not_handle_uri, ToastLength.Long).Show();
App.Kp2a.ShowMessage(this, Resource.String.error_can_not_handle_uri, MessageSeverity.Error);
return false;
}
IoUtil.TryTakePersistablePermissions(this.ContentResolver, intent.Data);
@@ -468,7 +468,7 @@ namespace keepass2android
}
catch (Exception e)
{
Toast.MakeText(this, "Failed to open child databases",ToastLength.Long).Show();
App.Kp2a.ShowMessage(this, "Failed to open child databases", MessageSeverity.Error);
Kp2aLog.LogUnexpectedError(e);
}