Merge pull request #1262 from nicksenger/fix/overlay-layouts

Fix: overlay layout for `Responsive`
This commit is contained in:
Héctor Ramón 2022-02-23 15:58:39 +07:00 committed by GitHub
commit e0185b8cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 }),
)
})