refactor: merge workspace state into app root
This commit is contained in:
@@ -24,9 +24,9 @@ mod helpers;
|
||||
|
||||
use helpers::{empty_section_row, repo_header, thread};
|
||||
|
||||
use crate::app::AppRoot;
|
||||
use crate::repo::actions::{RepoItem, open_repo_item};
|
||||
use crate::repo::helpers::announcement_display_name;
|
||||
use crate::workspace::Workspace;
|
||||
|
||||
const MAX_SUB_ACTIVITIES: usize = 5;
|
||||
|
||||
@@ -45,7 +45,7 @@ struct InboxSection {
|
||||
}
|
||||
|
||||
pub struct InboxView {
|
||||
workspace: WeakEntity<Workspace>,
|
||||
workspace: WeakEntity<AppRoot>,
|
||||
threads: Arc<Vec<InboxItem>>,
|
||||
sections: Arc<Vec<InboxSection>>,
|
||||
rows: Arc<Vec<InboxRow>>,
|
||||
@@ -60,7 +60,7 @@ pub struct InboxView {
|
||||
}
|
||||
|
||||
impl InboxView {
|
||||
pub fn new(workspace: WeakEntity<Workspace>, cx: &mut Context<Self>) -> Self {
|
||||
pub fn new(workspace: WeakEntity<AppRoot>, cx: &mut Context<Self>) -> Self {
|
||||
let backend = Backend::global(cx);
|
||||
let inbox = backend.read(cx).inbox();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user