title_bar: Simplify git-ui
feature flag check (#23475)
This PR is a follow-up to https://github.com/zed-industries/zed/pull/23470 that simplifies the way we check the `git-ui` feature flag in the title bar. Release Notes: - N/A
This commit is contained in:
parent
5930b552b9
commit
9f87145af9
5 changed files with 25 additions and 45 deletions
|
@ -1,6 +1,4 @@
|
|||
use ::settings::Settings;
|
||||
use feature_flags::WaitForFlag;
|
||||
use futures::{select_biased, FutureExt};
|
||||
use git::status::FileStatus;
|
||||
use git_panel_settings::GitPanelSettings;
|
||||
use gpui::{AppContext, Hsla};
|
||||
|
@ -14,17 +12,6 @@ pub fn init(cx: &mut AppContext) {
|
|||
GitPanelSettings::register(cx);
|
||||
}
|
||||
|
||||
// TODO: Remove this before launching Git UI
|
||||
pub async fn git_ui_enabled(flag: WaitForFlag) -> bool {
|
||||
let mut git_ui_feature_flag = flag.fuse();
|
||||
let mut timeout = FutureExt::fuse(smol::Timer::after(std::time::Duration::from_secs(5)));
|
||||
|
||||
select_biased! {
|
||||
is_git_ui_enabled = git_ui_feature_flag => is_git_ui_enabled,
|
||||
_ = timeout => false,
|
||||
}
|
||||
}
|
||||
|
||||
const ADDED_COLOR: Hsla = Hsla {
|
||||
h: 142. / 360.,
|
||||
s: 0.68,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue