mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Make sign_in init conditional
This commit is contained in:
parent
f5bbb41cc2
commit
ad8162fc9c
1 changed files with 37 additions and 37 deletions
|
@ -23,8 +23,7 @@ struct OpenGithub;
|
|||
const COPILOT_SIGN_UP_URL: &'static str = "https://github.com/features/copilot";
|
||||
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
let copilot = Copilot::global(cx).unwrap();
|
||||
|
||||
if let Some(copilot) = Copilot::global(cx) {
|
||||
let mut code_verification: Option<ViewHandle<CopilotCodeVerification>> = None;
|
||||
cx.observe(&copilot, move |copilot, cx| {
|
||||
let status = copilot.read(cx).status();
|
||||
|
@ -68,6 +67,7 @@ pub fn init(cx: &mut AppContext) {
|
|||
code_verification.connect_clicked = true;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn create_copilot_auth_window(
|
||||
|
|
Loading…
Reference in a new issue