auto-updates: Do not poll for updates on dev channel (#13311)

Our dev builds don't have updates and will never have updates, so
instead of polling our servers every time we start a dev instance, let's
disable it for the dev channel.

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-06-20 15:00:54 +02:00 committed by GitHub
parent f5f73efa8a
commit c20a1ee032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View file

@ -118,6 +118,14 @@ impl ReleaseChannel {
.map(|channel| channel.0)
}
/// Returns whether we want to poll for updates for this [`ReleaseChannel`]
pub fn poll_for_updates(&self) -> bool {
match self {
ReleaseChannel::Dev => false,
_ => true,
}
}
/// Returns the display name for this [`ReleaseChannel`].
pub fn display_name(&self) -> &'static str {
match self {