Nathan.fooo 51a11fbebd
chore: fix upload file limit (#6825)
* chore: fix file upload limit

* chore: update test
2024-11-18 16:21:47 +08:00

24 lines
635 B
Rust

use flowy_derive::ProtoBuf_Enum;
use flowy_notification::NotificationBuilder;
const OBSERVABLE_SOURCE: &str = "storage";
#[derive(ProtoBuf_Enum, Debug, Default)]
pub(crate) enum StorageNotification {
#[default]
FileStorageLimitExceeded = 0,
SingleFileLimitExceeded = 1,
}
impl std::convert::From<StorageNotification> for i32 {
fn from(notification: StorageNotification) -> Self {
notification as i32
}
}
#[tracing::instrument(level = "trace")]
pub(crate) fn make_notification(ty: StorageNotification) -> NotificationBuilder {
NotificationBuilder::new("appflowy_file_storage_notification", ty, OBSERVABLE_SOURCE)
}