mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Show alert dialog card for sharing personal detail submission via email when clicking on the feedback menu. (#4772)
* Fixes #4732 Show alert dialog card for sharing personal detail submission via email when clicking on feedback menu. * Show alert dialog card for sharing personal detail submission via email when clicking on feedback menu when user is logged in. Add javadoc for the new methods Update alert dialog message.
This commit is contained in:
parent
d0e14b7345
commit
873b4c500b
3 changed files with 44 additions and 1 deletions
|
|
@ -104,6 +104,27 @@ public class MoreBottomSheetFragment extends BottomSheetDialogFragment {
|
|||
|
||||
@OnClick(R.id.more_feedback)
|
||||
public void onFeedbackClicked() {
|
||||
showAlertDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method shows the alert dialog when a user wants to send feedback about the app.
|
||||
*/
|
||||
private void showAlertDialog() {
|
||||
new AlertDialog.Builder(getActivity())
|
||||
.setMessage(R.string.feedback_sharing_data_alert)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||
sendFeedback();
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method collects the feedback message and starts the activity with implicit intent
|
||||
* to available email client.
|
||||
*/
|
||||
private void sendFeedback() {
|
||||
final String technicalInfo = commonsLogSender.getExtraInfo();
|
||||
|
||||
final Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ import android.view.ViewGroup;
|
|||
import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import fr.free.nrw.commons.AboutActivity;
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.WelcomeActivity;
|
||||
import fr.free.nrw.commons.auth.LoginActivity;
|
||||
import fr.free.nrw.commons.di.ApplicationlessInjection;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
|
|
@ -64,6 +64,27 @@ public class MoreBottomSheetLoggedOutFragment extends BottomSheetDialogFragment
|
|||
|
||||
@OnClick(R.id.more_feedback)
|
||||
public void onFeedbackClicked() {
|
||||
showAlertDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method shows the alert dialog when a user wants to send feedback about the app.
|
||||
*/
|
||||
private void showAlertDialog() {
|
||||
new AlertDialog.Builder(getActivity())
|
||||
.setMessage(R.string.feedback_sharing_data_alert)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok, (dialog, which) -> {
|
||||
sendFeedback();
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method collects the feedback message and starts and activity with implicit intent
|
||||
* to available email client.
|
||||
*/
|
||||
private void sendFeedback() {
|
||||
final String technicalInfo = commonsLogSender.getExtraInfo();
|
||||
|
||||
final Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
|
|
|
|||
|
|
@ -682,4 +682,5 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="apply">Apply</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="location_message">Location data helps Wiki editors find your picture, making it much more useful.\nYour recent uploads have no location.\nWe suggest you turn on location in your camera app\'s settings.\nThank you for uploading!</string>
|
||||
<string name="feedback_sharing_data_alert">Please remove from this email any information that you are not comfortable sharing publicly. Also, please be aware that your email address with which you are posting, and the associated name and profile picture, will be visible publicly.</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue