Add the ability to jump between channels while in a channel
This commit is contained in:
parent
0ae1f29be8
commit
30e1bfc872
5 changed files with 110 additions and 3 deletions
|
@ -540,6 +540,7 @@ impl Client {
|
|||
}
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn add_message_handler<M, E, H, F>(
|
||||
self: &Arc<Self>,
|
||||
model: ModelHandle<E>,
|
||||
|
@ -575,8 +576,11 @@ impl Client {
|
|||
}),
|
||||
);
|
||||
if prev_handler.is_some() {
|
||||
let location = std::panic::Location::caller();
|
||||
panic!(
|
||||
"registered handler for the same message {} twice",
|
||||
"{}:{} registered handler for the same message {} twice",
|
||||
location.file(),
|
||||
location.line(),
|
||||
std::any::type_name::<M>()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue