Skip to content

Commit

Permalink
android: fix build
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Dec 14, 2024
1 parent 1e0228e commit 18226a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crates/notedeck_chrome/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -76,7 +79,7 @@ keystore_password = "damuskeystore"
name = "android.permission.INTERNET"

[package.metadata.android.application]
label = "Damus"
label = "Notedeck"

[package.metadata.deb]
name = "notedeck"
Expand Down
8 changes: 7 additions & 1 deletion crates/notedeck_chrome/src/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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))
}),
);
}

Expand Down

0 comments on commit 18226a3

Please sign in to comment.