Skip to content

Commit e3018a3

Browse files
committed
Some tweaks to the FeedbackActivity (#4273)
1 parent 9d9f921 commit e3018a3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

firebase-appdistribution/src/main/java/com/google/firebase/appdistribution/impl/FeedbackActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ private Bitmap readScreenshot() {
114114
public void submitFeedback(View view) {
115115
setSubmittingStateEnabled(true);
116116
EditText feedbackText = findViewById(R.id.feedbackText);
117+
CheckBox screenshotCheckBox = findViewById(R.id.screenshotCheckBox);
117118
feedbackSender
118-
.sendFeedback(releaseName, feedbackText.getText().toString(), screenshotUri)
119+
.sendFeedback(
120+
releaseName,
121+
feedbackText.getText().toString(),
122+
screenshotCheckBox.isChecked() ? screenshotUri : null)
119123
.addOnSuccessListener(
120124
unused -> {
121125
LogWrapper.getInstance().i(TAG, "Feedback submitted");
@@ -132,5 +136,7 @@ public void submitFeedback(View view) {
132136

133137
public void setSubmittingStateEnabled(boolean loading) {
134138
findViewById(R.id.sendButton).setVisibility(loading ? INVISIBLE : VISIBLE);
139+
findViewById(R.id.feedbackText).setEnabled(!loading);
140+
findViewById(R.id.feedbackText).setFocusable(!loading);
135141
}
136142
}

0 commit comments

Comments
 (0)