-
Notifications
You must be signed in to change notification settings - Fork 227
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
Flag Whatsapp Forwarded messages #1287
Comments
Thanks @gfd2020, this can be very useful. |
Hi @tc-wleite. Did it work as expected in your tests? |
Hi @gfd2020! |
Hello. |
I started a regression test yesterday on hundreds of whatsapp databases using PR #1651 and if everything looks good, I'll merge it. I noticed rendering lags when viewing large WhatsApp chats with that PR, I still need to check on master to confirm if it is a performance regression or not. Have you noticed something similar @tc-wleite? |
Large chats (the ones that are broken into parts) do cause rendering lags. But it doesn't seem to be something critical, at least in the cases that I tested here. It seems to be the same kind of lag present when opening larger HTMLs in the internal viewer. Not sure if it is the same type of delay you are observing. You can send me a sample database if you see larger lags than we had before, so I can investigate in more detail. |
Is the htmlviewer using javafx? |
This is already done explicitly for large chats, users can see many chat items referring to the same conversation. Maybe the max chat chunk size could be decreased, currently it is ~5MiB, but splitting too much can be annoying to users. Other approach could be splitting based on the number of messages, not on chat html size, actually it was done in the past and I don't know what is heavier to be rendered (5 MiB of text messages or 5MiB of multimedia messages). |
Large chats are already split into parts (different items). It doesn't use a pagination like this one, but I am not sure if this is really necessary. Simply reducing a bit the chat split threshold would help, but it is probably better to understand first if it is a regression or something else happening in particular chats, as I didn't observe any critical delay. |
Hi @tc-wleite, I got more parsing exceptions with #1651 than master. After I confirm them, I'll send the triggering samples privately to you. |
PS: Thanks for helping with this! |
I confirmed 4 NPEs, 3 of them with this stacktrace for sure:
I just sent the triggering samples to you by Teams. |
Thanks! |
We could improve some of this 'lag' implementing some lazy loading logic via 'javascript'. This could be done transparently via in HTMLViewer, so if it is a good idea, we can create new specific issue. |
I tested this again this morning, and didn't find any critical lag (obviously the "critical" threshold is kind of personal), neither observed any difference comparing to previous (master and 4.1.x) versions. |
Hi @tc-wleite, I took a closer look, there is no regression, sorry. The lag issue is with a specific database with a specific chat with a corrupted text message which is a few MBs of size, that message causes the slow rendering both on #1651 and on master, so that's an unrelated issue. By the way, I'm getting a different number of messages within different runs caused by another unrelated issue, that is making comparisons harder. I'll describe it in another ticket. |
I pushed a fix this morning that seems to fix this issue. |
I saw it, thank you! |
Group chats tend to be large and have a lot of incoming messages. A real case with a chat size of 5 MB, it was quite slow. The slowdown is caused by the chat bubble arrow. If you remove the 'position: relative' from the '#conversation .incoming' class and the 'position: absolute' from the '#conversation .incoming:before' class, performance is fine. However, the arrow will be drawn wrong. It would be necessary to find another way of drawing. |
Suggestion
Include in whatsapp chat messages the indication if the message has been forwarded.
How
The flag of this behavior are indicated as below (unless I'm mistaken. In my tests, it seems correct.)
IPHONE
ZWAMESSAGE.ZFLAGS bit 7
Example and test: select (1 << 7 & ZFLAGS) as forwarded from ZWAMESSAGE
ANDROID NEW
message.origination_flags bit 1
Example and test: select (origination_flags & 1) as forwarded FROM message
ANDROID OLD
messages.forwarded bit 1
Example and test: select (forwarded & 1) as forwarded FROM messages
On the ReportGenerator.java, add something like this ...
if (message.getForwarded() > 0) {
out.println("<img src="" + RSRC_PATH + "img/forward.png" valign="top"/><i style="color:gray">Forwarded
");
}
The text was updated successfully, but these errors were encountered: