-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Bugfix/3099/fix crash when open ai translation is enabled #3122
Bugfix/3099/fix crash when open ai translation is enabled #3122
Conversation
e469eb2
to
7b39ea8
Compare
a8543d9
to
05e467a
Compare
28eb895
to
1ac35eb
Compare
sending too much data via intent always is a bad pattern which can lead to TransactionTooLargeException. When OpenAI translation is enabled, the capabilities contain a ton of translation combinations. These capabilities are contained in 'currentUser' as well in 'selectedConversation'. So, TransactionTooLargeException was thrown. this PR: - avoids passing too much data as parcelables in intents (esp. conversation and user) - introduces MVVM patterns to load required data (esp conversation) from backend (for now via requests, in the future from database first) - introduces ConversationModel which is created out of the Conversation json model - loads user data via injection when possible - creates some quickfixes in ConversationBottomDialog, EntryMenuController and OperationsMenuController. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The parsed result was without quotes which resulted in error: Unterminated object at character 21 of [{fromLabel=English (US), Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
1ac35eb
to
cbf74cc
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3122-talk.apk |
/backport to stable-17.0 |
The backport to stable-17.0 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable-17.0
git pull origin stable-17.0
# Create the new backport branch
git checkout -b fix/foo-stable-17.0
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable-17.0 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
expected.. |
fix #3099
Bug was caused by sending too much data via intent (leads to crash / TransactionTooLargeException).
When OpenAI translation is enabled, the capabilities contain a ton of translation combinations. These capabilities are contained in 'currentUser' as well in 'selectedConversation'. So, TransactionTooLargeException was thrown.
this PR:
🚧 TODO for Follow up PR's
Simplify ConversationBottomDialog, EntryMenuController and OperationsMenuController.
These classes need some refactoring anyway to remove conductor.
Avoid using the Conversation JSON model throughout the app. Replace with new ConversationModel.
Further move code to ViewModels
Create new models from JSON, e.g. for chat message etc.. Include "lastMessage" in ConversationModel
Remove methods from Conversation JSON model. use ConversationUtil instead that uses the domain model.
🏁 Checklist
/backport to stable-xx.x