Add global Fs
instance (#15044)
This PR adds a global `Fs` instance to the app context. This will make it easier to access the filesystem in some cases instead of having to thread it around. Release Notes: - N/A
This commit is contained in:
parent
5062bf0b4d
commit
d36ebc8c74
3 changed files with 21 additions and 2 deletions
|
@ -14,7 +14,7 @@ use collab_ui::channel_view::ChannelView;
|
|||
use db::kvp::KEY_VALUE_STORE;
|
||||
use editor::Editor;
|
||||
use env_logger::Builder;
|
||||
use fs::RealFs;
|
||||
use fs::{Fs, RealFs};
|
||||
use futures::{future, StreamExt};
|
||||
use git::GitHostingProviderRegistry;
|
||||
use gpui::{
|
||||
|
@ -399,6 +399,8 @@ fn main() {
|
|||
AppCommitSha::set_global(AppCommitSha(build_sha.into()), cx);
|
||||
}
|
||||
|
||||
<dyn Fs>::set_global(fs.clone(), cx);
|
||||
|
||||
GitHostingProviderRegistry::set_global(git_hosting_provider_registry, cx);
|
||||
git_hosting_providers::init(cx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue