1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-24 23:12:55 +00:00

Improved no viewer message

This commit is contained in:
M66B 2020-06-21 15:01:44 +02:00
parent 9052760439
commit 41654d152e
7 changed files with 14 additions and 14 deletions

View file

@ -387,7 +387,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
super.startActivity(intent);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(this, getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(this, getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}
@ -397,7 +397,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
super.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(this, getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(this, getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}

View file

@ -2928,7 +2928,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(context,
context.getString(R.string.title_no_viewer, intent.getAction()),
context.getString(R.string.title_no_viewer, intent),
Toast.LENGTH_LONG).show();
}
}
@ -3941,7 +3941,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}.execute(context, owner, args, "view:cid");
else
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri), Toast.LENGTH_LONG).show();
}
private void onMenuUnseen(final TupleMessageEx message) {
@ -4343,7 +4343,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
PackageManager pm = context.getPackageManager();
if (intent.resolveActivity(pm) == null) // system whitelisted
Snackbar.make(parentFragment.getView(),
context.getString(R.string.title_no_viewer, intent.getAction()),
context.getString(R.string.title_no_viewer, intent),
Snackbar.LENGTH_LONG).
show();
else

View file

@ -137,7 +137,7 @@ public class FragmentBase extends Fragment {
super.startActivity(intent);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}
@ -147,7 +147,7 @@ public class FragmentBase extends Fragment {
super.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}

View file

@ -1494,7 +1494,7 @@ public class FragmentCompose extends FragmentBase {
startActivityForResult(intent, REQUEST_RECORD_AUDIO);
} catch (SecurityException ex) {
Log.w(ex);
Snackbar.make(view, getString(R.string.title_no_viewer, intent.getAction()), Snackbar.LENGTH_INDEFINITE).show();
Snackbar.make(view, getString(R.string.title_no_viewer, intent), Snackbar.LENGTH_INDEFINITE).show();
}
}
@ -1904,7 +1904,7 @@ public class FragmentCompose extends FragmentBase {
startActivityForResult(intent, REQUEST_TAKE_PHOTO);
} catch (SecurityException ex) {
Log.w(ex);
Snackbar.make(view, getString(R.string.title_no_viewer, intent.getAction()), Snackbar.LENGTH_LONG).show();
Snackbar.make(view, getString(R.string.title_no_viewer, intent), Snackbar.LENGTH_LONG).show();
}
}
} else {

View file

@ -164,7 +164,7 @@ public class FragmentDialogBase extends DialogFragment {
super.startActivity(intent);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}
@ -174,7 +174,7 @@ public class FragmentDialogBase extends DialogFragment {
super.startActivityForResult(intent, requestCode);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, intent), Toast.LENGTH_LONG).show();
}
}
}

View file

@ -326,7 +326,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
try {
getContext().startActivity(app);
} catch (Throwable ex) {
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, app.getAction()), Toast.LENGTH_LONG).show();
ToastEx.makeText(getContext(), getString(R.string.title_no_viewer, app), Toast.LENGTH_LONG).show();
}
}
});

View file

@ -491,7 +491,7 @@ public class Helper {
context.startActivity(intent);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri), Toast.LENGTH_LONG).show();
}
}
@ -528,7 +528,7 @@ public class Helper {
customTabsIntent.launchUrl(context, uri);
} catch (ActivityNotFoundException ex) {
Log.w(ex);
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri.toString()), Toast.LENGTH_LONG).show();
ToastEx.makeText(context, context.getString(R.string.title_no_viewer, uri), Toast.LENGTH_LONG).show();
} catch (Throwable ex) {
Log.e(ex);
ToastEx.makeText(context, Log.formatThrowable(ex, false), Toast.LENGTH_LONG).show();