add one shot error message
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -82,3 +82,13 @@ impl Error {
|
||||
Error::Filter(FilterError::EmptyContactList)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn show_one_error_message(ui: &mut egui::Ui, message: &str) {
|
||||
let id = ui.id().with(("error", message));
|
||||
let res: Option<()> = ui.ctx().data(|d| d.get_temp(id));
|
||||
|
||||
if res.is_none() {
|
||||
ui.ctx().data_mut(|d| d.insert_temp(id, ()));
|
||||
tracing::error!(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ pub use accounts::{AccountData, Accounts, AccountsAction, AddAccountAction, Swit
|
||||
pub use app::{App, AppAction, Notedeck};
|
||||
pub use args::Args;
|
||||
pub use context::AppContext;
|
||||
pub use error::{Error, FilterError, ZapError};
|
||||
pub use error::{show_one_error_message, Error, FilterError, ZapError};
|
||||
pub use filter::{FilterState, FilterStates, UnifiedSubscription};
|
||||
pub use fonts::NamedFontFamily;
|
||||
pub use imgcache::{
|
||||
|
||||
Reference in New Issue
Block a user