android: fix build
Fixes: dac786e60f ("chrome: remove duplication in app setup")
This commit is contained in:
@@ -16,7 +16,7 @@ pub extern "C" fn Java_com_damus_notedeck_KeyboardHeightHelper_nativeKeyboardHei
|
|||||||
debug!("updating virtual keyboard height {}", height);
|
debug!("updating virtual keyboard height {}", height);
|
||||||
|
|
||||||
// Convert and store atomically
|
// Convert and store atomically
|
||||||
KEYBOARD_HEIGHT.store(height as i32, Ordering::SeqCst);
|
KEYBOARD_HEIGHT.store(height, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the current Android virtual keyboard height. Useful for transforming
|
/// Gets the current Android virtual keyboard height. Useful for transforming
|
||||||
|
|||||||
@@ -2,20 +2,15 @@
|
|||||||
//use egui_android::run_android;
|
//use egui_android::run_android;
|
||||||
|
|
||||||
use egui_winit::winit::platform::android::activity::AndroidApp;
|
use egui_winit::winit::platform::android::activity::AndroidApp;
|
||||||
use notedeck::enostr::Error;
|
|
||||||
use notedeck_columns::Damus;
|
|
||||||
use notedeck_dave::Dave;
|
|
||||||
use notedeck_notebook::Notebook;
|
|
||||||
|
|
||||||
use crate::{app::NotedeckApp, chrome::Chrome, setup::setup_egui_context};
|
use crate::chrome::Chrome;
|
||||||
use notedeck::Notedeck;
|
use notedeck::Notedeck;
|
||||||
use tracing::error;
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
pub async fn android_main(app: AndroidApp) {
|
pub async fn android_main(app: AndroidApp) {
|
||||||
//use tracing_logcat::{LogcatMakeWriter, LogcatTag};
|
//use tracing_logcat::{LogcatMakeWriter, LogcatTag};
|
||||||
use tracing_subscriber::{prelude::*, EnvFilter};
|
use tracing_subscriber::{EnvFilter, prelude::*};
|
||||||
|
|
||||||
std::env::set_var("RUST_BACKTRACE", "full");
|
std::env::set_var("RUST_BACKTRACE", "full");
|
||||||
//std::env::set_var("DAVE_ENDPOINT", "http://ollama.jb55.com/v1");
|
//std::env::set_var("DAVE_ENDPOINT", "http://ollama.jb55.com/v1");
|
||||||
@@ -70,9 +65,8 @@ pub async fn android_main(app: AndroidApp) {
|
|||||||
Box::new(move |cc| {
|
Box::new(move |cc| {
|
||||||
let ctx = &cc.egui_ctx;
|
let ctx = &cc.egui_ctx;
|
||||||
let mut notedeck = Notedeck::new(ctx, path, &app_args);
|
let mut notedeck = Notedeck::new(ctx, path, &app_args);
|
||||||
notedeck.setup()?;
|
notedeck.setup(ctx);
|
||||||
|
let chrome = Chrome::new_with_apps(cc, &app_args, &mut notedeck)?;
|
||||||
let chrome = Chrome::new_with_apps(&mut notedeck);
|
|
||||||
notedeck.set_app(chrome);
|
notedeck.set_app(chrome);
|
||||||
|
|
||||||
Ok(Box::new(notedeck))
|
Ok(Box::new(notedeck))
|
||||||
|
|||||||
Reference in New Issue
Block a user