Skip to content

Commit fad8c58

Browse files
committed
Fixed wrong error message in place selection field
1 parent 963ce58 commit fad8c58

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎app/src/main/java/it/unimib/pickapp/ui/MatchFragment.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
110110

111111

112112
saveButton.setOnClickListener(v -> {
113-
if (placeSelectionViewModel.getSelected().getValue() == null) {
113+
if (matchViewModel.getSelectedPlace().getValue() == null) {
114114
String error = getResources().getString(R.string.choosePlaceMessage);
115115
Toast.makeText(requireContext(),
116116
error, Toast.LENGTH_SHORT).show();
@@ -149,7 +149,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
149149
}
150150
match.setTitolo(title);
151151
match.setSport(((SpinnerItem) sportSpinner.getSelectedItem()).getKey());
152-
match.setLuogo(placeSelectionViewModel.getSelected().getValue().getId());
152+
match.setLuogo(matchViewModel.getSelectedPlace().getValue().getId());
153153
match.setDate(dateEditText.getText().toString());
154154
match.setTime(timeEditText.getText().toString());
155155
String costString = costEditText.getText().toString();

‎app/src/main/res/layout/participant_list_fragment.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
android:layout_height="match_parent"
99
android:background="@color/white"
1010
app:layoutManager="LinearLayoutManager"
11-
tools:context=".ui.PlaceSelectionFragment"
11+
tools:context=".ui.ParticipantListFragment"
1212
tools:listitem="@layout/user_item_layout" />

0 commit comments

Comments
 (0)