-
-
Notifications
You must be signed in to change notification settings - Fork 265
Refactor drafts to save both Messages & Replies to Room Storage #5037
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
base: master
Are you sure you want to change the base?
Conversation
8818b47
to
666c4c9
Compare
I figured it would be simpler to clear the reply state when exiting |
Having the reply parent removed when leaving the chat is not expected. It should be possible to have drafts for each conversation including reply parent messages saved. I think best is to avoid the handling with with single sharedPreferences values. Maybe we could use room for this. Adding |
@@ -295,11 +311,20 @@ class MessageInputFragment : Fragment() { | |||
|
|||
private fun restoreState() { | |||
if (binding.fragmentMessageInputView.inputEditText.text.isEmpty()) { | |||
Log.d("Julius", "State restored from: ${chatActivity.localClassName}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove
Pretty simple right now, there's a column |
4b44a93
to
7bdce75
Compare
@rapterjet2004 whats the state of the PR? can you update the labels or let me know if it's to review again? |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
Signed-off-by: rapterjet2004 <[email protected]>
Signed-off-by: rapterjet2004 <[email protected]>
Signed-off-by: rapterjet2004 <[email protected]>
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5037-talk.apk |
Error was caused by the ConversationDao function |
--
MessageDraft
which holds the state of any message draft. Can be easily extended to support things like file URI's, in the future, as it's saved as TEXT in Json format.messageText != ""
upsertConversations
was edited to support syncing data sourced from the server, without overwriting data sourced from the user. We can now store any arbitrary conversation metadata without messing up the sync.TODO
🏁 Checklist
/backport to stable-xx.x