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

fix: replace connectivity state "Connected" with "Preparing" #6302

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Dec 2, 2024

This better reflects that this state means
we just connected and there may me work to do.
This state is converted to DC_CONNECTIVITY_WORKING
instead of DC_CONNECTIVITY_CONNECTED state now.

Before this change when IMAP connected
to the server, it switched
from DC_CONNECTIVITY_NOT_CONNECTED
to DC_CONNECTIVITY_CONNECTING,
then to DC_CONNECTIVITY_CONNECTED (actually preparing)
then to DC_CONNECTIVITY_WORKING
and then to DC_CONNECTIVITY_CONNECTED again (actually idle).

On fast connections this resulted in flickering "Connected"
string in the status bar right before "Updating..."
and on slow connections this "Connected" state
before "Updating..." lasted for a while
leaving the user to wonder if there are no new messages
or if Delta Chat will still switch to "Updating..."
before going into "Connected" state again.

@link2xt link2xt force-pushed the link2xt/connectivity-preparing branch from fdcbef3 to 447a116 Compare December 2, 2024 00:46
@link2xt link2xt marked this pull request as ready for review December 2, 2024 00:46
@link2xt link2xt force-pushed the link2xt/connectivity-preparing branch 3 times, most recently from fc4dc82 to fc136ef Compare December 2, 2024 23:12
src/scheduler/connectivity.rs Show resolved Hide resolved
src/scheduler/connectivity.rs Outdated Show resolved Hide resolved
This better reflects that this state means
we just connected and there may me work to do.
This state is converted to DC_CONNECTIVITY_WORKING
instead of DC_CONNECTIVITY_CONNECTED state now.

Before this change when IMAP connected
to the server, it switched
from DC_CONNECTIVITY_NOT_CONNECTED
to DC_CONNECTIVITY_CONNECTING,
then to DC_CONNECTIVITY_CONNECTED (actually preparing)
then to DC_CONNECTIVITY_WORKING
and then to DC_CONNECTIVITY_CONNECTED again (actually idle).

On fast connections this resulted in flickering "Connected"
string in the status bar right before "Updating..."
and on slow connections this "Connected" state
before "Updating..." lasted for a while
leaving the user to wonder if there are no new messages
or if Delta Chat will still switch to "Updating..."
before going into "Connected" state again.
@link2xt link2xt force-pushed the link2xt/connectivity-preparing branch from fc136ef to 4a1b391 Compare December 3, 2024 00:22
@link2xt link2xt enabled auto-merge (rebase) December 3, 2024 00:22
@link2xt link2xt merged commit 3b0b237 into main Dec 3, 2024
37 checks passed
@link2xt link2xt deleted the link2xt/connectivity-preparing branch December 3, 2024 00:35
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.

3 participants