mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-30 20:40:53 +00:00

* chore: move grid_view_editor.rs to view_editor folder * chore: hide invisible rows * fix: lock issue * fix: flutter test potential failed * chore: separate group tests Co-authored-by: nathan <nathan@appflowy.io>
37 lines
957 B
Rust
37 lines
957 B
Rust
use dart_notify::DartNotifyBuilder;
|
|
use flowy_derive::ProtoBuf_Enum;
|
|
const OBSERVABLE_CATEGORY: &str = "Grid";
|
|
|
|
#[derive(ProtoBuf_Enum, Debug)]
|
|
pub enum GridDartNotification {
|
|
Unknown = 0,
|
|
DidCreateBlock = 11,
|
|
DidUpdateGridBlock = 20,
|
|
DidUpdateGridField = 21,
|
|
DidUpdateRow = 30,
|
|
DidUpdateCell = 40,
|
|
DidUpdateField = 50,
|
|
DidUpdateGroupView = 60,
|
|
DidUpdateGroup = 61,
|
|
DidGroupByNewField = 62,
|
|
DidUpdateFilter = 63,
|
|
DidUpdateGridSetting = 70,
|
|
}
|
|
|
|
impl std::default::Default for GridDartNotification {
|
|
fn default() -> Self {
|
|
GridDartNotification::Unknown
|
|
}
|
|
}
|
|
|
|
impl std::convert::From<GridDartNotification> for i32 {
|
|
fn from(notification: GridDartNotification) -> Self {
|
|
notification as i32
|
|
}
|
|
}
|
|
|
|
#[tracing::instrument(level = "trace")]
|
|
pub fn send_dart_notification(id: &str, ty: GridDartNotification) -> DartNotifyBuilder {
|
|
DartNotifyBuilder::new(id, ty, OBSERVABLE_CATEGORY)
|
|
}
|