mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-04 14:57:27 +00:00

* feat: add flowy-database2 * chore: config type option data * chore: impl type option * feat: config group * fix: group compile * feat: add sort * chore: setting * chore: insert with specific type * chore: custom group * chore: rename any map * chore: use group setting * chore: update * chore: open database event * chore: update database editor * chore: update * chore: update view editor * chore: update * chore: update view editor * chore: sort feat * chore: update handler * chore: update * chore: config handler event * feat: impl handlers * feat: impl handlers * chore: layout setting * feat: impl handlers * chore: remove flowy-folder ref * chore: integrate flowy-database2 * feat: get cell * chore: create database with data * chore: create view * chore: fix dart compile * fix: some bugs * chore: update * chore: merge develop * chore: fix warning * chore: integrate rocksdb * fix: rocksdb compile errros * fix: update cell * chore: update the bundle identifier * fix: create row * fix: switch to field * fix: duplicate grid * test: migrate tests * test: migrate tests * test: update test * test: migrate tests * chore: add patch
28 lines
654 B
Rust
28 lines
654 B
Rust
use flowy_derive::ProtoBuf_Enum;
|
|
use flowy_notification::NotificationBuilder;
|
|
|
|
const OBSERVABLE_CATEGORY: &str = "Document";
|
|
|
|
#[derive(ProtoBuf_Enum, Debug)]
|
|
pub(crate) enum DocumentNotification {
|
|
Unknown = 0,
|
|
|
|
DidReceiveUpdate = 1,
|
|
}
|
|
|
|
impl std::default::Default for DocumentNotification {
|
|
fn default() -> Self {
|
|
DocumentNotification::Unknown
|
|
}
|
|
}
|
|
|
|
impl std::convert::From<DocumentNotification> for i32 {
|
|
fn from(notification: DocumentNotification) -> Self {
|
|
notification as i32
|
|
}
|
|
}
|
|
|
|
pub(crate) fn send_notification(id: &str, ty: DocumentNotification) -> NotificationBuilder {
|
|
NotificationBuilder::new(id, ty, OBSERVABLE_CATEGORY)
|
|
}
|