Open r10s opened 2 years ago
I wouldn't show an arrow when there are no more updates to be send, because it has no benefit (If there is no spinning circle then it's obvious that no more messages are in the queue) and only clutters the view.
additional notes:
the "update sending states" should also take https://github.com/deltachat/deltachat-core-rust/pull/3417 into account (pending updates that do not exist as messages yet)
we have a similar issue with resending of messages. also there, the initial message is already sent successfully, but "additional things" are not (in ui, we could still use the same indicator in the bubbles, but internally, we probably need an additional state for that)
so, maybe generalize these cases to sth. as dc_msg_get_upload_state()
or dc_msg_is_all_work_done()
(the latter wording is already known by dc_accounts_t
).
Is there a way to transport a promise over ffi-boundaries? Because if we just add a normal ffi-funkcion or enhance dc_msg_get_webxdc_info()
we have to bussily wait for smtp-requests to finish. This seems like a waste of ressources.
I know that there is a way to transport Promises in webassembly, but I'm not sure about ours
Edit: I've taken a closer look at our setup and I guess I'm writing something event-based since that seems to be the taken approach
Is there a way to transport a promise over ffi-boundaries?
not really, we have to do that over events.
i suggest to do it similar to dc_get_connectivity()
:
currently, the end-user of an Webxdc has no good idea about whether all updates are sent out or not.
the idea is to let the UI show a similar online indicator as in the bubbles - so a rotating circle or so when there is sth. pending and a checkmark when all update messages are sent.
the indicator should not be shown by the Webxdc itself, but just by the implementation, a good place seems to be right of the title that is shown in all UI anyway. the .xdc does not need to be adapted then.
technically, we could add a separate ffi or enhance
dc_msg_get_webxdc_info()
.