Use 1x icon in View-once bubbles, explanatory expired toasts

This commit is contained in:
Scott Nonnenberg 2020-01-10 08:29:51 -08:00 committed by Ken Powers
parent 14cc11d5de
commit 4f50c0b093
11 changed files with 96 additions and 34 deletions

View file

@ -90,6 +90,20 @@
return { toastMessage: i18n('conversationReturnedToInbox') };
},
});
Whisper.TapToViewExpiredIncomingToast = Whisper.ToastView.extend({
render_attributes() {
return {
toastMessage: i18n('Message--tap-to-view--incoming--expired-toast'),
};
},
});
Whisper.TapToViewExpiredOutgoingToast = Whisper.ToastView.extend({
render_attributes() {
return {
toastMessage: i18n('Message--tap-to-view--outgoing--expired-toast'),
};
},
});
Whisper.FileSavedToast = Whisper.ToastView.extend({
className: 'toast toast-clickable',
initialize(options) {
@ -459,6 +473,12 @@
const downloadNewVersion = () => {
this.downloadNewVersion();
};
const showExpiredIncomingTapToViewToast = () => {
this.showToast(Whisper.TapToViewExpiredIncomingToast);
};
const showExpiredOutgoingTapToViewToast = () => {
this.showToast(Whisper.TapToViewExpiredOutgoingToast);
};
const scrollToQuotedMessage = async options => {
const { author, sentAt } = options;
@ -623,6 +643,8 @@
showIdentity,
showMessageDetail,
showVisualAttachment,
showExpiredIncomingTapToViewToast,
showExpiredOutgoingTapToViewToast,
}),
});