fix: overlay layout for Responsive

This commit is contained in:
Nick Senger 2022-02-22 15:02:47 +07:00
parent adce9e0421
commit a12a92c266
No known key found for this signature in database
GPG key ID: F905159224DB77D8

View file

@ -178,7 +178,7 @@ where
let content_layout = state.layout(layout);
match content {
Content::Pending(_) => false,
Content::Pending(_) => None,
Content::Ready(cache) => {
*cache = Some(
CacheBuilder {
@ -190,14 +190,19 @@ where
.build(),
);
cache.as_ref().unwrap().borrow_overlay().is_some()
cache
.as_ref()
.unwrap()
.borrow_overlay()
.as_ref()
.map(|overlay| overlay.position())
}
}
};
has_overlay.then(|| {
has_overlay.map(|position| {
overlay::Element::new(
layout.position(),
position,
Box::new(Overlay { instance: self }),
)
})