only construct about metadata on macos

This commit is contained in:
Josh Junon 2024-04-19 15:49:23 +02:00
parent ed088f4431
commit 7f35537798
No known key found for this signature in database

View File

@ -2,9 +2,11 @@ use anyhow::Context;
use gitbutler_core::error;
use gitbutler_core::error::Code;
use serde_json::json;
#[cfg(target_os = "macos")]
use tauri::AboutMetadata;
use tauri::{
AboutMetadata, AppHandle, CustomMenuItem, Manager, Menu, MenuItem, PackageInfo, Runtime,
Submenu, WindowMenuEvent,
AppHandle, CustomMenuItem, Manager, Menu, MenuItem, PackageInfo, Runtime, Submenu,
WindowMenuEvent,
};
use tracing::instrument;
@ -31,11 +33,11 @@ pub async fn menu_item_set_enabled(
}
pub fn build(package_info: &PackageInfo) -> Menu {
let app_name = &package_info.name;
let mut menu = Menu::new();
#[cfg(target_os = "macos")]
{
let app_name = &package_info.name;
menu = menu.add_submenu(Submenu::new(
app_name,
Menu::new()