Skip to content

Commit

Permalink
Fix broken input handling on purchase page, fixes #806
Browse files Browse the repository at this point in the history
  • Loading branch information
patzly committed Nov 26, 2023
1 parent 42c4396 commit 6bdd78d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
24 changes: 6 additions & 18 deletions app/src/main/res/layout/fragment_purchase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,6 @@

</com.google.android.material.card.MaterialCardView>

<com.google.android.material.card.MaterialCardView
style="@style/Widget.Grocy.Card.Text"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:visibility="gone">

<TextView
style="@style/Widget.Grocy.TextView.Paragraph"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/colorOnSurfaceVariant"
android:text="You can choose an existing product from the list or write a new product name and press done. If the name doesn\'t exist, the purchase will be saved for later." />

</com.google.android.material.card.MaterialCardView>

<View
android:id="@+id/dummy_focus_view"
android:layout_width="0dp"
Expand Down Expand Up @@ -296,7 +279,12 @@
android:completionThreshold="1"
android:popupBackground="@drawable/bg_auto_complete"
android:text="@={formData.productNameLive}"
app:productList="@{formData.productsLive}" />
android:onItemClick="@{(parent, view, pos, id) -> fragment.onItemAutoCompleteClick(parent, pos)}"
android:afterTextChanged="@{() -> formData.isProductNameValid()}"
app:productList="@{formData.productsLive}"
app:onNextClickInSoftKeyboard="@{() -> fragment.clearFocusAndCheckProductInput()}"
app:onTabPressListener="@{() -> fragment.clearFocusAndCheckProductInputExternal()}"
app:onEnterPressListener="@{() -> fragment.clearFocusAndCheckProductInputExternal()}"/>

</com.google.android.material.textfield.TextInputLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/raw/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 3.4.1

- Fixed: Crash when navigating to settings (#805)
- Fixed: Crash on login page
- Fixed: Crash on login page (#806)
- Fixed: Broken input handling on purchase page (#806)

## 3.4.0

Expand Down

0 comments on commit 6bdd78d

Please sign in to comment.