mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Conversation view blocks sending to left groups
Instead of attempting to send, which will throw an 'Unknown group' exception, show a toast. // FREEBIE
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
return { toastMessage: i18n('unblockToSend') };
|
||||
}
|
||||
});
|
||||
Whisper.LeftGroupToast = Whisper.ToastView.extend({
|
||||
render_attributes: function() {
|
||||
return { toastMessage: i18n('youLeftTheGroup') };
|
||||
}
|
||||
});
|
||||
|
||||
var MenuView = Whisper.View.extend({
|
||||
toggleMenu: function() {
|
||||
@@ -343,12 +348,15 @@
|
||||
var toast;
|
||||
if (extension.expired()) {
|
||||
toast = new Whisper.ExpiredToast();
|
||||
toast.$el.insertAfter(this.$el);
|
||||
toast.render();
|
||||
return;
|
||||
}
|
||||
if (this.model.isPrivate() && storage.isBlocked(this.model.id)) {
|
||||
toast = new Whisper.BlockedToast();
|
||||
}
|
||||
if (!this.model.isPrivate() && this.model.get('left')) {
|
||||
toast = new Whisper.LeftGroupToast();
|
||||
}
|
||||
|
||||
if (toast) {
|
||||
toast.$el.insertAfter(this.$el);
|
||||
toast.render();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user