mobile: make mobile flag runtime-configurable
we need to pass a few more things around but it's not that bad. This will allow you to launch damus with --mobile for mobile testing without recompilation.
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
use crate::ui::View;
|
||||
|
||||
pub struct PreviewConfig {
|
||||
pub is_mobile: bool,
|
||||
}
|
||||
|
||||
pub trait Preview {
|
||||
type Prev: View;
|
||||
|
||||
fn preview() -> Self::Prev;
|
||||
fn preview(cfg: PreviewConfig) -> Self::Prev;
|
||||
}
|
||||
|
||||
pub struct PreviewApp {
|
||||
|
||||
Reference in New Issue
Block a user