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

Video calls iOS #179

Merged
merged 12 commits into from
Jun 7, 2022
Merged

Video calls iOS #179

merged 12 commits into from
Jun 7, 2022

Conversation

aforge
Copy link
Collaborator

@aforge aforge commented Jun 6, 2022

Basic functionality should be working

@aforge aforge requested a review from or-else June 6, 2022 17:25
@or-else
Copy link
Contributor

or-else commented Jun 6, 2022

Looks OK at the first glance. Let's merge and then fix.

I made two material changes in Android compare to your code:

  1. Instead of trying to read the latest version of each message from the main table, I mutated the main message with every change. The versions were also saved to the main table but with a reference ID, which made it easy to filter them out. The versions of the overwritten message content were stored into a separate table EditHistory in case we want ot show edit history. It simplified the code (no need for in-memory cursor) and fixed a couple of bugs (like replying to a wrong message version and incorrect message bubble).
  2. I removed VC-related custom variables from formatter classes and moved all the data they contained to VC entity itself. That required rewriting the VC drafty content with the values from the header. I added such rewrites to two places: where the message is received and where it's sent.

It might be a good idea to do it the same way here too.

BTW, the cache management in iOS is busted: it does not work when trying to fetch older messages. I'm trying to fix it now.
It's probably busted in Android too.

@aforge
Copy link
Collaborator Author

aforge commented Jun 7, 2022

Looks OK at the first glance. Let's merge and then fix.

I made two material changes in Android compare to your code:

  1. Instead of trying to read the latest version of each message from the main table, I mutated the main message with every change. The versions were also saved to the main table but with a reference ID, which made it easy to filter them out. The versions of the overwritten message content were stored into a separate table EditHistory in case we want ot show edit history. It simplified the code (no need for in-memory cursor) and fixed a couple of bugs (like replying to a wrong message version and incorrect message bubble).
  2. I removed VC-related custom variables from formatter classes and moved all the data they contained to VC entity itself. That required rewriting the VC drafty content with the values from the header. I added such rewrites to two places: where the message is received and where it's sent.

It might be a good idea to do it the same way here too.

BTW, the cache management in iOS is busted: it does not work when trying to fetch older messages. I'm trying to fix it now. It's probably busted in Android too.

Sounds good. I'll follow up with the similar changes in iOS.
Merging now.

@aforge aforge merged commit 2bf91a0 into next Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants