Lazily bind Signal.Components.MediaGallery
This commit is contained in:
parent
146178f977
commit
204de3aaea
1 changed files with 1 additions and 32 deletions
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
const { MediaGallery } = window.Signal.Components;
|
|
||||||
|
|
||||||
Whisper.ExpiredToast = Whisper.ToastView.extend({
|
Whisper.ExpiredToast = Whisper.ToastView.extend({
|
||||||
render_attributes() {
|
render_attributes() {
|
||||||
return { toastMessage: i18n('expiredWarning') };
|
return { toastMessage: i18n('expiredWarning') };
|
||||||
|
@ -610,7 +608,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const view = new Whisper.ReactWrapperView({
|
const view = new Whisper.ReactWrapperView({
|
||||||
Component: MediaGallery,
|
Component: Signal.Components.MediaGallery,
|
||||||
props: mediaGalleryProps,
|
props: mediaGalleryProps,
|
||||||
onClose: () => this.resetPanel(),
|
onClose: () => this.resetPanel(),
|
||||||
});
|
});
|
||||||
|
@ -675,35 +673,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
viewAllMedia() {
|
|
||||||
// We have to do this manually, since our React component will not propagate click
|
|
||||||
// events up to its parent elements in the DOM.
|
|
||||||
this.closeMenu();
|
|
||||||
|
|
||||||
// Next:
|
|
||||||
// pull latest media
|
|
||||||
// need a way for react component to request further data
|
|
||||||
|
|
||||||
// needed components:
|
|
||||||
// GalleryPanel
|
|
||||||
// Section - header, list of thumbnails
|
|
||||||
// Thumbnail
|
|
||||||
// Lightbox - or do we use the lightbox already in the app?
|
|
||||||
|
|
||||||
const props = {
|
|
||||||
media: [],
|
|
||||||
documents: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
const view = new window.Whisper.ReactWrapper({
|
|
||||||
Component: MediaGallery,
|
|
||||||
props,
|
|
||||||
onClose: () => this.resetPanel(),
|
|
||||||
});
|
|
||||||
|
|
||||||
this.listenBack(view);
|
|
||||||
},
|
|
||||||
|
|
||||||
focusMessageField() {
|
focusMessageField() {
|
||||||
this.$messageField.focus();
|
this.$messageField.focus();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue