mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
add message length warning for android clients
This commit is contained in:
committed by
Scott Nonnenberg
parent
d269751dbc
commit
ec3278ca3a
@@ -78,6 +78,7 @@
|
||||
'destroy' : i18n('deleteMessages'),
|
||||
'send-message' : i18n('sendMessage'),
|
||||
'disappearing-messages': i18n('disappearingMessages'),
|
||||
'android-length-warning': i18n('androidMessageLengthWarning'),
|
||||
timer_options : Whisper.ExpirationTimerOptions.models
|
||||
};
|
||||
},
|
||||
@@ -180,6 +181,13 @@
|
||||
this.$('.capture-audio').show();
|
||||
}
|
||||
},
|
||||
toggleLenghtWarning: function() {
|
||||
if (this.$('.send-message').val().length > 2000 || this.fileInput.hasFiles()) {
|
||||
this.$('.android-length-warning').show();
|
||||
} else {
|
||||
this.$('.android-length-warning').hide();
|
||||
}
|
||||
},
|
||||
captureAudio: function(e) {
|
||||
e.preventDefault();
|
||||
var view = new Whisper.RecorderView().render();
|
||||
@@ -630,6 +638,7 @@
|
||||
return this.$('.bottom-bar form').submit();
|
||||
}
|
||||
this.toggleMicrophone();
|
||||
this.toggleLenghtWarning();
|
||||
|
||||
this.view.measureScrollPosition();
|
||||
window.autosize(this.$messageField);
|
||||
|
||||
Reference in New Issue
Block a user