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: File Attachment Preview Dialog crashes ChatActivity #3674

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

parneet-guraya
Copy link
Contributor

Fixes: #3572

🖼️ Screenshots

Before

Record_2024-02-29-17-19-09.mp4

After

Record_2024-02-29-17-17-33.mp4

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@parneet-guraya
Copy link
Contributor Author

Hi @mahibi, could you give it a look?

The reason for crashing was that this dialog fragment does not have a default constructor. So, when config changes occured the activity does not know how to initialize a parameterized constructor and looks for empty constructor, hence the crash. Instead use empty constructor with arguments passed to it as bundle.

I have seen some more fragment implementations like this, will create an issue for that and fix it.

@parneet-guraya parneet-guraya added the 3. to review Waiting for reviews label Feb 29, 2024
@parneet-guraya
Copy link
Contributor Author

parneet-guraya commented Feb 29, 2024

@mahibi, Also I'm doubtful about using scroll view in a dialog. The buttons were going out of the screen when in landscape mode, so I added the scroll view. Let me know if it's correct to use it here.

@parneet-guraya parneet-guraya force-pushed the file-attach-preview-handle-config branch 3 times, most recently from 819666b to ad2795b Compare March 5, 2024 02:40
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Codacy

Lint

TypemasterPR
Warnings8181
Errors1010

SpotBugs

CategoryBaseNew
Bad practice66
Correctness99
Dodgy code111111
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total139139

@AndyScherzinger AndyScherzinger requested review from sowjanyakch and removed request for AndyScherzinger March 5, 2024 09:43
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
@mahibi mahibi force-pushed the file-attach-preview-handle-config branch from ad2795b to 82a4657 Compare March 5, 2024 10:43
@mahibi
Copy link
Collaborator

mahibi commented Mar 5, 2024

👍

@mahibi mahibi merged commit 5a42341 into master Mar 5, 2024
13 of 16 checks passed
@mahibi mahibi deleted the file-attach-preview-handle-config branch March 5, 2024 10:44
Copy link
Contributor

github-actions bot commented Mar 5, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3674-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi mahibi added this to the 19.0.0 milestone Mar 5, 2024
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

18.0.1: conversation popup: flip from horizontal to vertical kills app
2 participants