Shaky skips the feedback form after the bottom sheet was dismissed

Đang mở Phù hợp với người mới
#103 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, java
Lĩnh vực
mobile

Hướng nghiên cứu

Đọc launchShakeBottomSheet của delegate, chỗ đặt isBottomSheetFlowActive = true, rồi onDataReady/doStartFeedbackFlow nơi flag chỉ được xóa sau khi một flow sheet đã được submit, và handler của dòng Dismiss trong bottom sheet. Tái hiện bằng sample app: “Manually launch bottom sheet”, “Dismiss”, rồi “Manually start feedback”. Hoàn thành nghĩa là OnCancelListener của sheet xóa flag, dòng Dismiss gọi cancel(), các dòng bắt đầu flow vẫn gọi dismiss(), và flow thủ công đến được FeedbackActivity.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

On main (ca3e5f0), with the default delegate (shouldUseBottomSheet() returns true):

  1. Shake, or call startShakeBottomSheetFlowManually(). The bottom sheet opens.
  2. Close it without picking a row: tap "Dismiss", press back, tap outside or swipe it down.
  3. Call shaky.startFeedbackFlow(), which the README suggests for starting the flow without a shake.

Expected: FeedbackActivity opens and the user can write a message.

Actual: after the screenshot is collected, delegate.submit() is called right away with no message and a null title. With EmailShakeDelegate that opens the mail app with only the screenshot attached.

launchShakeBottomSheet sets isBottomSheetFlowActive = true when it shows the sheet. The flag is only cleared in onDataReady after a sheet flow has submitted. If the sheet is closed without a choice, nothing clears it, so the next doStartFeedbackFlow() from startFeedbackFlow() takes the sheet branch in onDataReady. The sample app shows it too: tap "Manually launch bottom sheet", tap "Dismiss", then tap "Manually start feedback".

I have a small fix: clear the flag in an OnCancelListener on the sheet, and make the Dismiss row call cancel() instead of dismiss(). The row taps that start a flow still call dismiss(), so their path is unchanged. A plain dismiss listener would not work: the row tap broadcasts first and the dismiss callback would clear the flag before onDataReady reads it.

Ngôn ngữ chính
Java
Star
162
Fork
59
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linkedin/shaky-android

Tất cả issue của linkedin/shaky-android

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.