use the name in the dioxus.toml in desktop if no name was set in the desktop config

This commit is contained in:
Evan Almloff committed 2023-11-14 15:53:11 -06:00
1 parent 1ed66a54cc
commit 15984b78db
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -49,7 +49,12 @@ impl Config {
/// Initializes a new `WindowBuilder` with default values.
#[inline]
pub fn new() -> Self {
let window = WindowBuilder::new().with_title("Dioxus app");
let window = WindowBuilder::new().with_title(
dioxus_cli_config::CURRENT_CONFIG
.as_ref()
.map(|c| c.dioxus_config.application.name.clone())
.unwrap_or("Dioxus App".to_string()),
);
Self {
// event_handler: None,