mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-19 13:16:34 +00:00
simplify is_mobile check
Just base it on the current compile target Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
28e2e7edd5
commit
0a6a441041
@ -36,8 +36,14 @@ pub fn padding<R>(
|
||||
.show(ui, add_contents)
|
||||
}
|
||||
|
||||
pub fn is_mobile(ctx: &egui::Context) -> bool {
|
||||
//true
|
||||
let screen_size = ctx.screen_rect().size();
|
||||
screen_size.x < 550.0
|
||||
#[inline]
|
||||
pub fn is_mobile(_ctx: &egui::Context) -> bool {
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
{
|
||||
true
|
||||
}
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user