mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-21 17:24:21 +01:00
Use app_creation for common app setup functions
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
committed by
William Casarin
parent
a927c56870
commit
80b76c5381
@@ -1,6 +1,8 @@
|
||||
#![warn(clippy::all, rust_2018_idioms)]
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
use notedeck::Damus;
|
||||
use notedeck::app_creation::generate_native_options;
|
||||
|
||||
|
||||
// Entry point for wasm
|
||||
//#[cfg(target_arch = "wasm32")]
|
||||
@@ -13,17 +15,9 @@ async fn main() {
|
||||
// Log to stdout (if you run with `RUST_LOG=debug`).
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let window_builder = Box::new(|builder: egui::ViewportBuilder| {
|
||||
builder.with_fullsize_content_view(true)
|
||||
.with_titlebar_shown(false)
|
||||
.with_title_shown(false)
|
||||
});
|
||||
let mut native_options = eframe::NativeOptions::default();
|
||||
native_options.window_builder = Some(window_builder);
|
||||
|
||||
let _res = eframe::run_native(
|
||||
"Damus NoteDeck",
|
||||
native_options,
|
||||
generate_native_options(),
|
||||
Box::new(|cc| Box::new(Damus::new(cc, ".", std::env::args().collect()))),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user