Implement structure to open modal when clicking on media item
This commit is contained in:
parent
2ec2fda116
commit
be92920cc5
4 changed files with 101 additions and 82 deletions
|
|
@ -67,8 +67,8 @@ pub struct CollatableMediaContainer < A : MediaAdapter + 'static > {
|
|||
}
|
||||
|
||||
impl < A : MediaAdapter > CollatableMediaContainer <A> {
|
||||
pub fn new () -> Self {
|
||||
let collated_grid = leak ( CollatedMediaGrid :: new () ) ;
|
||||
pub fn new ( on_media_selected : impl Fn ( A :: Overview ) + 'static ) -> Self {
|
||||
let collated_grid = leak ( CollatedMediaGrid :: new (on_media_selected) ) ;
|
||||
let collation_menu = MediaCollationMenu :: new :: <A> ( |sorting|
|
||||
collated_grid . set_sorting (sorting) ,
|
||||
) ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue