Read-only access for channel guests (#3841)
This commit is contained in:
commit
1a993ca496
42 changed files with 619 additions and 191 deletions
|
@ -1187,7 +1187,7 @@ impl Workspace {
|
|||
mut save_intent: SaveIntent,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Task<Result<bool>> {
|
||||
if self.project.read(cx).is_read_only() {
|
||||
if self.project.read(cx).is_disconnected() {
|
||||
return Task::ready(Ok(true));
|
||||
}
|
||||
let dirty_items = self
|
||||
|
@ -2510,7 +2510,7 @@ impl Workspace {
|
|||
}
|
||||
|
||||
fn update_window_edited(&mut self, cx: &mut ViewContext<Self>) {
|
||||
let is_edited = !self.project.read(cx).is_read_only()
|
||||
let is_edited = !self.project.read(cx).is_disconnected()
|
||||
&& self
|
||||
.items(cx)
|
||||
.any(|item| item.has_conflict(cx) || item.is_dirty(cx));
|
||||
|
@ -3635,7 +3635,7 @@ impl Render for Workspace {
|
|||
})),
|
||||
)
|
||||
.child(self.status_bar.clone())
|
||||
.children(if self.project.read(cx).is_read_only() {
|
||||
.children(if self.project.read(cx).is_disconnected() {
|
||||
Some(DisconnectedOverlay)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue