You've already forked AstralRinth
forked from didirus/AstralRinth
Merge commit '81ec068747a39e927c42273011252daaa58f1e14' into feature-clean
This commit is contained in:
@@ -25,6 +25,7 @@ extern crate objc;
|
||||
#[tracing::instrument(skip_all)]
|
||||
#[tauri::command]
|
||||
async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> {
|
||||
tracing::info!("Initializing app event state...");
|
||||
theseus::EventState::init(app.clone()).await?;
|
||||
|
||||
// #[cfg(feature = "updater")]
|
||||
@@ -35,7 +36,8 @@ async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> {
|
||||
|
||||
// let update_fut = updater.check();
|
||||
|
||||
// State::init().await?;
|
||||
// tracing::info!("Initializing app state...");
|
||||
State::init().await?;
|
||||
|
||||
// let check_bar = theseus::init_loading(
|
||||
// theseus::LoadingBarType::CheckingForUpdates,
|
||||
@@ -44,7 +46,8 @@ async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> {
|
||||
// )
|
||||
// .await?;
|
||||
|
||||
// let update = update_fut.await;
|
||||
// tracing::info!("Checking for updates...");
|
||||
// let update = update_fut.await;
|
||||
|
||||
// drop(check_bar);
|
||||
|
||||
@@ -88,6 +91,7 @@ async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> {
|
||||
State::init().await?;
|
||||
}
|
||||
|
||||
tracing::info!("Finished checking for updates!");
|
||||
let state = State::get().await?;
|
||||
app.asset_protocol_scope()
|
||||
.allow_directory(state.directories.caches_dir(), true)?;
|
||||
@@ -185,7 +189,7 @@ fn main() {
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_deep_link::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
.with_filename(
|
||||
@@ -244,12 +248,9 @@ fn main() {
|
||||
dbg!(url);
|
||||
});
|
||||
|
||||
if let Some(window) = app.get_window("main") {
|
||||
// Hide window to prevent white flash on startup
|
||||
let _ = window.hide();
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
if let Some(window) = app.get_window("main") {
|
||||
window.set_shadow(true).unwrap();
|
||||
}
|
||||
}
|
||||
@@ -272,6 +273,7 @@ fn main() {
|
||||
.plugin(api::tags::init())
|
||||
.plugin(api::utils::init())
|
||||
.plugin(api::cache::init())
|
||||
.plugin(api::friends::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
initialize_state,
|
||||
is_dev,
|
||||
@@ -285,6 +287,7 @@ fn main() {
|
||||
builder = builder.plugin(macos::window_ext::init());
|
||||
}
|
||||
|
||||
tracing::info!("Initializing app...");
|
||||
let app = builder.build(tauri::generate_context!());
|
||||
|
||||
match app {
|
||||
@@ -346,6 +349,7 @@ fn main() {
|
||||
.show_alert()
|
||||
.unwrap();
|
||||
|
||||
tracing::error!("Error while running tauri application: {:?}", e);
|
||||
panic!("{1}: {:?}", e, "error while running tauri application")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user