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

display error events to the user #12

Closed
r10s opened this issue Sep 19, 2018 · 1 comment
Closed

display error events to the user #12

r10s opened this issue Sep 19, 2018 · 1 comment
Projects

Comments

@r10s
Copy link
Member

r10s commented Sep 19, 2018

filing this issue so that it is not forgotten. it's not the most urgent thing to do :)

in general, deltachat-core sends errors to the UI as DC_EVENT_ERROR (there are also DC_EVENT_WARNING and DC_EVENT_INFO, which, however, should not be displayed to the user directly).

the most recent version displays DC_EVENT_ERROR during configuration as a dialog.

however, DC_EVENT_ERROR should also be reported to the user in other situations, possibly in a non-disturbing way.

eg, you will get the DC_EVENT_ERROR event when you're offline and try to send a message. the user should be informed by this, but, as eg. in flaky networks this is quite usual, it would be too much to let the user confirm the error.
(to distinguish between the display methods, for android, we i use a simple flag showErrorAsDialog that is set before configuration and cleared afterwards. if it is set, when handling DC_EVENT_ERROR we save if as a string (as ios does now) else we show a non-disturbing message)

maybe we can use sth. as the "toast" on android for this, here is a very compact example about how this can be implemtented: https://stackoverflow.com/questions/18680891/displaying-a-message-in-ios-which-has-the-same-functionality-as-toast-in-android#answer-49454931

don't know ios, maybe there are also better ways.

maybe it is also an option to just do nothing here - messages that have errors should be flagged anyway and dc_msg_get _info() also gets the error for exactly this message.
maybe this is sufficient and there is nothing more to do :) again, it also depend on what ios users typically expect.

@r10s
Copy link
Member Author

r10s commented Mar 21, 2020

closing this for now, a toast is somewhat unusual on ios.

as an alternative, as mentioned, during configure/import/etc, errors are shown directly. sending errors are visible by the pending-icon.

moreover, the core will add info-messages in these cases.

what's left is, if the server cannot send messages to the device and the internet connection is working meanwhile. showing a toast "cannot receive" one time is not really helping here, i think, sooner or later, the core will provide a function to check this situation, then we can think over how to show this to the user, maybe by just showing "not connected" in the title of the chats-tab. but this is another issue for another time.

@r10s r10s closed this as completed Mar 21, 2020
Onboarding automation moved this from To do to Done Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Onboarding
  
Done
Development

No branches or pull requests

1 participant