Skip to content

fix: Feedback - button and crashes #2185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class EventDetailsFragment : Fragment() {
.nonNull()
.observe(viewLifecycleOwner, Observer {
rootView.feedbackProgress.isVisible = it
rootView.feedbackBtn.isEnabled = !it
rootView.feedbackBtn.isVisible = !it
})

eventViewModel.eventFeedback.observe(viewLifecycleOwner, Observer {
Expand All @@ -286,7 +286,10 @@ class EventDetailsFragment : Fragment() {
eventViewModel.submittedFeedback
.nonNull()
.observe(viewLifecycleOwner, Observer {
feedbackAdapter.add(it)
if (feedbackAdapter.itemCount < LIMITED_FEEDBACK_NUMBER)
feedbackAdapter.add(it)
else
rootView.seeFeedbackTextView.isVisible = true
rootView.feedbackRv.isVisible = true
rootView.noFeedBackTv.isVisible = false
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SearchTypeFragment : Fragment() {
private val searchTypeViewModel by viewModel<SearchTypeViewModel>()
private val safeArgs: SearchTypeFragmentArgs by navArgs()
private lateinit var rootView: View
private val eventTypesList = ArrayList<String>()
private val eventTypesList = ArrayList<String>()

override fun onCreateView(
inflater: LayoutInflater,
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/content_event.xml
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,13 @@

<Button
android:id="@+id/feedbackBtn"
style="@style/ThreeDS2TextButtonStyle"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For UI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do which is not in default style?

Copy link
Member Author

@liveHarshit liveHarshit Jul 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shows elevation and boundary line. Even if a transparent background is set.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this. But I see no documentation for this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it. It is from the stripe library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Please revert it in the next development iteration ASAP.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Please revert it in the next development iteration ASAP.

Sure 👍

android:textAllCaps="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_small"
android:layout_marginStart="@dimen/layout_margin_large"
android:layout_marginEnd="@dimen/layout_margin_large"
android:layout_marginTop="@dimen/layout_margin_medium"
android:layout_marginBottom="@dimen/layout_margin_large"
android:textColor="@color/colorAccent"
android:text="@string/write_feedback" />
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_event.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
layout="@layout/content_event"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/event_details_divider_margin"
android:layout_marginBottom="@dimen/layout_margin_extreme_large"
bind:event="@{event}" />

<View
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@
<string name="and_i_m_up_for">And I\'m up for</string>
<string name="what_type">What Sounds good?</string>
<string name="feedback">Feedback</string>
<string name="write_feedback">Write Feedback</string>
<string name="write_feedback">Write a feedback</string>
<string name="submit">Submit</string>
<string name="submit_feedback">Submit Feedback</string>
<string name="feedback_submitted">Feedback submitted Successfully</string>
<string name="be_the_first_to_write_a_review">Be the first to write a review</string>
<string name="be_the_first_to_write_a_review">Be the first to write a feedback</string>
<string name="frequently_asked_questions">Frequently Asked Questions</string>
<string name="no_faq_message">There are no frequenly asked questions for this event.</string>

Expand Down