From 22fa6c07ddcb81dec25d3fe110212817b1e65d67 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 27 Oct 2022 10:57:59 -0700 Subject: [PATCH] Indicate release channel in auto-update notification --- crates/auto_update/src/update_notification.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/auto_update/src/update_notification.rs b/crates/auto_update/src/update_notification.rs index bbc9b0ea7f6f7e4812a5573d4cb0f7f7e7cd3e6b..19faca24a071867746ce09a6d91d1df29adaad20 100644 --- a/crates/auto_update/src/update_notification.rs +++ b/crates/auto_update/src/update_notification.rs @@ -5,7 +5,7 @@ use gpui::{ Element, Entity, MouseButton, View, ViewContext, }; use menu::Cancel; -use settings::Settings; +use settings::{ReleaseChannel, Settings}; use workspace::Notification; pub struct UpdateNotification { @@ -29,13 +29,19 @@ impl View for UpdateNotification { let theme = cx.global::().theme.clone(); let theme = &theme.update_notification; + let app_name = match *cx.global::() { + ReleaseChannel::Dev => "Zed Dev", + ReleaseChannel::Preview => "Zed Preview", + ReleaseChannel::Stable => "Zed", + }; + MouseEventHandler::::new(0, cx, |state, cx| { Flex::column() .with_child( Flex::row() .with_child( Text::new( - format!("Updated to Zed {}", self.version), + format!("Updated to {app_name} {}", self.version), theme.message.text.clone(), ) .contained()