SAO UI uses MusicPlayerPanel when the protocol is selected
This commit is contained in:
parent
317541486c
commit
3ddda5f0c1
|
@ -12,12 +12,19 @@ pub mod widgets;
|
|||
use api::*;
|
||||
use canary_script::*;
|
||||
use main_menu::MainMenuPanel;
|
||||
use music_player::MusicPlayerPanel;
|
||||
use widgets::Widget;
|
||||
|
||||
export_abi!(bind_panel_impl);
|
||||
|
||||
fn bind_panel_impl(panel: Panel, _protocol: Message, msg: Message) -> Box<dyn PanelImpl> {
|
||||
MainMenuPanel::bind(panel, msg)
|
||||
fn bind_panel_impl(panel: Panel, protocol: Message, msg: Message) -> Box<dyn PanelImpl> {
|
||||
let protocol = protocol.to_vec();
|
||||
let protocol = String::from_utf8(protocol).unwrap();
|
||||
|
||||
match protocol.as_str() {
|
||||
"tebibyte-media.desktop.music-player-controller" => MusicPlayerPanel::bind(panel, msg),
|
||||
_ => MainMenuPanel::bind(panel, msg),
|
||||
}
|
||||
}
|
||||
|
||||
pub const ICON_FONT: &str = "Iosevka Nerd Font";
|
||||
|
|
Loading…
Reference in New Issue