android: fix build

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-12-14 01:51:56 -08:00
parent 1e0228e396
commit 18226a35ff
2 changed files with 11 additions and 2 deletions

View File

@@ -26,6 +26,9 @@ tracing-subscriber = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
[lib]
crate-type = ["lib", "cdylib"]
[[bin]]
name = "notedeck"
path = "src/notedeck.rs"
@@ -76,7 +79,7 @@ keystore_password = "damuskeystore"
name = "android.permission.INTERNET"
[package.metadata.android.application]
label = "Damus"
label = "Notedeck"
[package.metadata.deb]
name = "notedeck"

View File

@@ -2,6 +2,7 @@
//use egui_android::run_android;
use crate::app::Notedeck;
use notedeck_columns::Damus;
use winit::platform::android::activity::AndroidApp;
use winit::platform::android::EventLoopBuilderExtAndroid;
@@ -25,7 +26,12 @@ pub async fn android_main(app: AndroidApp) {
let _res = eframe::run_native(
"Damus Notedeck",
options,
Box::new(move |cc| Ok(Box::new(Notedeck::new(&cc.egui_ctx, path, &app_args)))),
Box::new(move |cc| {
let mut notedeck = Notedeck::new(&cc.egui_ctx, path, &app_args);
let damus = Damus::new(&mut notedeck.app_context(), &app_args);
notedeck.add_app(damus);
Ok(Box::new(notedeck))
}),
);
}