Skip to content

Commit 6c16afb

Browse files
committed
fix: Feedback - button and crashes (#2175) (#2184)
1 parent 489afd3 commit 6c16afb

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class EventDetailsFragment : Fragment() {
267267
.nonNull()
268268
.observe(viewLifecycleOwner, Observer {
269269
rootView.feedbackProgress.isVisible = it
270-
rootView.feedbackBtn.isEnabled = !it
270+
rootView.feedbackBtn.isVisible = !it
271271
})
272272

273273
eventViewModel.eventFeedback.observe(viewLifecycleOwner, Observer {
@@ -286,7 +286,10 @@ class EventDetailsFragment : Fragment() {
286286
eventViewModel.submittedFeedback
287287
.nonNull()
288288
.observe(viewLifecycleOwner, Observer {
289-
feedbackAdapter.add(it)
289+
if (feedbackAdapter.itemCount < LIMITED_FEEDBACK_NUMBER)
290+
feedbackAdapter.add(it)
291+
else
292+
rootView.seeFeedbackTextView.isVisible = true
290293
rootView.feedbackRv.isVisible = true
291294
rootView.noFeedBackTv.isVisible = false
292295
})

app/src/main/res/layout/content_event.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,14 @@
557557

558558
<Button
559559
android:id="@+id/feedbackBtn"
560+
style="@style/ThreeDS2TextButtonStyle"
561+
android:textAllCaps="true"
562+
android:textAlignment="center"
560563
android:layout_width="match_parent"
561564
android:layout_height="wrap_content"
562-
android:layout_marginTop="@dimen/layout_margin_small"
563-
android:layout_marginStart="@dimen/layout_margin_large"
564-
android:layout_marginEnd="@dimen/layout_margin_large"
565+
android:layout_marginTop="@dimen/layout_margin_medium"
565566
android:layout_marginBottom="@dimen/layout_margin_large"
567+
android:textColor="@color/colorAccent"
566568
android:text="@string/write_feedback" />
567569
</LinearLayout>
568570

app/src/main/res/layout/fragment_event.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
layout="@layout/content_event"
4141
android:layout_width="match_parent"
4242
android:layout_height="match_parent"
43-
android:layout_marginBottom="@dimen/event_details_divider_margin"
43+
android:layout_marginBottom="@dimen/layout_margin_extreme_large"
4444
bind:event="@{event}" />
4545

4646
<View

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@
356356
<string name="and_i_m_up_for">And I\'m up for</string>
357357
<string name="what_type">What Sounds good?</string>
358358
<string name="feedback">Feedback</string>
359-
<string name="write_feedback">Write Feedback</string>
359+
<string name="write_feedback">Write a feedback</string>
360360
<string name="submit">Submit</string>
361361
<string name="submit_feedback">Submit Feedback</string>
362362
<string name="feedback_submitted">Feedback submitted Successfully</string>
363-
<string name="be_the_first_to_write_a_review">Be the first to write a review</string>
363+
<string name="be_the_first_to_write_a_review">Be the first to write a feedback</string>
364364
<string name="frequently_asked_questions">Frequently Asked Questions</string>
365365
<string name="no_faq_message">There are no frequenly asked questions for this event.</string>
366366

0 commit comments

Comments
 (0)