Added error message-shows and mail_successful/mail_failed to the error messages.
This commit is contained in:
@@ -146,7 +146,7 @@ public class ProfileFragment extends Fragment implements View.OnClickListener {
|
|||||||
try {
|
try {
|
||||||
photoFile = createImageFile();
|
photoFile = createImageFile();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Toast.makeText(getActivity(), getString(R.string.image_save_error), Toast.LENGTH_LONG);
|
Toast.makeText(getActivity(), getString(R.string.image_save_error), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
if (photoFile != null) {
|
if (photoFile != null) {
|
||||||
Uri photoURI = FileProvider.getUriForFile(getActivity(),
|
Uri photoURI = FileProvider.getUriForFile(getActivity(),
|
||||||
@@ -213,8 +213,8 @@ public class ProfileFragment extends Fragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onComplete(@NonNull Task<Void> task) {
|
public void onComplete(@NonNull Task<Void> task) {
|
||||||
Toast.makeText(getActivity(), task.isSuccessful()
|
Toast.makeText(getActivity(), task.isSuccessful()
|
||||||
? "An e-mail was sent, please follow its instructions."
|
? getString(R.string.mail_successful)
|
||||||
: "An error occurred, please check internet connection.",
|
: getString(R.string.mail_failed),
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,4 +31,5 @@
|
|||||||
<string name="update_profile_pic_error">Het updaten van de profielfoto is mislukt. Controleer uw internetverbinding.</string>
|
<string name="update_profile_pic_error">Het updaten van de profielfoto is mislukt. Controleer uw internetverbinding.</string>
|
||||||
<string name="upload_profile_pic">Profielfoto aan het uploaden…</string>
|
<string name="upload_profile_pic">Profielfoto aan het uploaden…</string>
|
||||||
<string name="niet_slecht">"\"Niet slecht.\"s "</string>
|
<string name="niet_slecht">"\"Niet slecht.\"s "</string>
|
||||||
|
<string name="mail_success">An e-mail was sent, please follow its instructions.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -29,5 +29,5 @@
|
|||||||
<string name="mail_failed">An error occurred. Please check internet connection.</string>
|
<string name="mail_failed">An error occurred. Please check internet connection.</string>
|
||||||
<string name="image_save_error">Saving image to storage failed. Please make sure there is space available on the device.</string>
|
<string name="image_save_error">Saving image to storage failed. Please make sure there is space available on the device.</string>
|
||||||
<string name="update_profile_pic_error">Updating the profile picture failed. Please check network connection.</string>
|
<string name="update_profile_pic_error">Updating the profile picture failed. Please check network connection.</string>
|
||||||
<string name="upload_profile_pic">Uploading profile picture...</string>
|
<string name="upload_profile_pic">Uploading profile picture…</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user