WIP: Move statuses to be on their associated file entries in worktree
co-authored-by: Julia <julia@zed.dev>
This commit is contained in:
parent
584e5f7958
commit
22e4086658
10 changed files with 124 additions and 383 deletions
|
@ -1002,6 +1002,7 @@ impl ProjectPanel {
|
|||
mtime: entry.mtime,
|
||||
is_symlink: false,
|
||||
is_ignored: false,
|
||||
git_status: entry.git_status,
|
||||
});
|
||||
}
|
||||
if expanded_dir_ids.binary_search(&entry.id).is_err()
|
||||
|
@ -1108,14 +1109,8 @@ impl ProjectPanel {
|
|||
.unwrap_or(&[]);
|
||||
|
||||
let entry_range = range.start.saturating_sub(ix)..end_ix - ix;
|
||||
for (entry, repo) in
|
||||
snapshot.entries_with_repositories(visible_worktree_entries[entry_range].iter())
|
||||
{
|
||||
let status = (git_status_setting
|
||||
&& entry.path.parent().is_some()
|
||||
&& !entry.is_ignored)
|
||||
.then(|| repo.and_then(|repo| repo.status_for_path(&snapshot, &entry.path)))
|
||||
.flatten();
|
||||
for entry in visible_worktree_entries[entry_range].iter() {
|
||||
let status = git_status_setting.then(|| entry.git_status).flatten();
|
||||
|
||||
let mut details = EntryDetails {
|
||||
filename: entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue