Skip to content
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

fix: Made "image upload" message more descriptive on Product Addition #4852

Merged
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 @@ -150,7 +150,7 @@ class ProductEditPhotosFragment : ProductEditFragment() {
if (errorInUploading) {
binding.imageProgressText.visibility = View.GONE
} else {
binding.imageProgressText.setText(R.string.image_uploaded_successfully)
binding.imageProgressText.setText(R.string.additional_image_uploaded_successfully)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ class EditIngredientsFragment : ProductEditFragment() {
.resize(dps50ToPixels, dps50ToPixels)
.centerInside()
.into(binding.btnAddImageIngredients)

Toast.makeText(activity,R.string.ingredients_image_uploaded_successfully,Toast.LENGTH_LONG).show()
VaiTon marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,8 @@ class EditOverviewFragment : ProductEditFragment() {
.resize(requireContext().dpsToPixel(50), requireContext().dpsToPixel(50))
.centerInside()
.into(binding.imgFront)

Toast.makeText(activity,R.string.front_image_uploaded_successfully,Toast.LENGTH_LONG).show()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ class SummaryProductFragment : BaseFragment(), ISummaryProductPresenter.View {
Toast.makeText(requireContext(), err.message, Toast.LENGTH_SHORT).show()
}
binding.uploadingImageProgress.visibility = View.GONE
binding.uploadingImageProgressText.setText(R.string.image_uploaded_successfully)
binding.uploadingImageProgressText.text = if (sendOther) {
getString(R.string.additional_image_uploaded_successfully)
} else {
getString(R.string.front_image_uploaded_successfully)
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@
<string name="scan_QR_code">Scan QR Code for product website</string>
<string name="add_at_least_one_picture">Please add at least one picture of this product before proceeding</string>
<string name="image_uploaded_successfully">Image uploaded successfully</string>
<string name="additional_image_uploaded_successfully">Additional image uploaded successfully</string>
<string name="front_image_uploaded_successfully">Front image uploaded successfully</string>
<string name="ingredients_image_uploaded_successfully">Ingredients image uploaded successfully</string>
<string name="error_adding_product_photos">Something went wrong while trying to add product photos</string>
<string name="save_product">Do you want to save the product?</string>
<string name="error_adding_product">Something went wrong when adding the product</string>
Expand Down