Skip to content

Commit 98d2b5e

Browse files
anhanh11001iamareebjamal
authored andcommitted
fix: Make chip not checkable and search possible (#1659)
Detail: In FavoriteFragment, make chips not clickable Make search possible by adding search type Fixes: #1655
1 parent 9831bda commit 98d2b5e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteFragment.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ class FavoriteFragment : Fragment() {
150150
}
151151

152152
private fun openSearchResult(time: String) {
153-
SearchResultsFragmentArgs(query = "", location = Preference().getString(SAVED_LOCATION).toString(), date = time)
153+
SearchResultsFragmentArgs(query = "",
154+
location = Preference().getString(SAVED_LOCATION).toString(),
155+
type = getString(R.string.anything),
156+
date = time)
154157
.toBundle()
155158
.also { bundle ->
156159
findNavController(rootView).navigate(R.id.searchResultsFragment, bundle, Utils.getAnimSlide())

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,29 @@
4141
android:layout_width="wrap_content"
4242
android:layout_height="wrap_content"
4343
android:text="@string/today"
44+
android:checkable="false"
4445
android:id="@+id/todayChip"/>
4546

4647
<com.google.android.material.chip.Chip
4748
android:layout_width="wrap_content"
4849
android:layout_height="wrap_content"
4950
android:text="@string/tomorrow"
51+
android:checkable="false"
5052
android:id="@+id/tomorrowChip"/>
5153

5254
<com.google.android.material.chip.Chip
5355
android:layout_width="wrap_content"
5456
android:layout_height="wrap_content"
5557
android:text="@string/weekend"
58+
android:checkable="false"
5659
android:id="@+id/weekendChip"/>
5760

5861
<com.google.android.material.chip.Chip
5962
android:layout_width="wrap_content"
6063
android:layout_height="wrap_content"
6164
android:text="@string/month"
6265
android:textSize="@dimen/text_size_small"
66+
android:checkable="false"
6367
android:id="@+id/monthChip"/>
6468
</com.google.android.material.chip.ChipGroup>
6569

0 commit comments

Comments
 (0)