vec buffer: send ListDiff::Clear before refilling vec with new values in with_data_arc_port()
This commit is contained in:
parent
a795270515
commit
af0d72df00
1 changed files with 1 additions and 0 deletions
|
@ -86,6 +86,7 @@ where
|
|||
pub fn with_data_arc_port(data: Arc<RwLock<Vec<T>>>, port: InnerViewPort<RwLock<Vec<T>>>) -> Self {
|
||||
port.set_view(Some(data.clone()));
|
||||
|
||||
port.notify(&VecDiff::Clear);
|
||||
for x in data.read().unwrap().iter().cloned() {
|
||||
port.notify(&VecDiff::Push(x));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue