MCPcopy Create free account
hub / github.com/AppFlowy-IO/AppFlowy-Collab / remove_sort

Method remove_sort

collab/src/database/database.rs:997–1011  ·  view source on GitHub ↗
(&mut self, view_id: &str, sort_id: &str)

Source from the content-addressed store, hash-verified

995 }
996
997 pub fn remove_sort(&mut self, view_id: &str, sort_id: &str) {
998 let mut txn = self.collab.transact_mut();
999 if let Ok(view_id) = self.body.parse_view_id(view_id) {
1000 self
1001 .body
1002 .views
1003 .update_database_view(&mut txn, &view_id, |update| {
1004 update.update_sorts(|txn, sort_update| {
1005 if let Some(i) = sort_update.index_by_id(txn, sort_id) {
1006 sort_update.remove(txn, i);
1007 }
1008 });
1009 });
1010 }
1011 }
1012
1013 pub fn remove_all_sorts(&mut self, view_id: &str) {
1014 let mut txn = self.collab.transact_mut();

Callers 1

Calls 6

transact_mutMethod · 0.80
parse_view_idMethod · 0.80
update_sortsMethod · 0.80
index_by_idMethod · 0.80
update_database_viewMethod · 0.45
removeMethod · 0.45

Tested by 1