Enable sending quoted replies, two fixes (#2284)

Enable sending quoted replies, two fixes
This commit is contained in:
Scott Nonnenberg 2018-04-25 09:09:30 -07:00 committed by GitHub
commit adf91ee84c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View file

@ -373,6 +373,7 @@
if (firstRun === true && deviceId != '1') {
if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') {
storage.put('theme-setting', 'ios');
onChangeTheme();
}
var syncRequest = new textsecure.SyncRequest(textsecure.messaging, messageReceiver);
Whisper.events.trigger('contactsync:begin');
@ -394,6 +395,12 @@
}
}
function onChangeTheme() {
var view = window.owsDesktopApp.appView;
if (view) {
view.applyTheme();
}
}
function onEmpty() {
initialLoadComplete = true;

View file

@ -1250,7 +1250,7 @@
// If we already have a quoted message, then we exit early. If we don't have it,
// then we'll continue to look again for an in-memory message to use. Why? This
// will enable us to scroll to it when the user clicks.
if (messages.quotedMessage) {
if (message.quotedMessage) {
return;
}

View file

@ -456,8 +456,8 @@
const contact = this.model.isIncoming() ? this.model.getContact() : null;
const attachments = this.model.get('attachments');
// TODO: used for the feature flag below
// const hasErrors = errors && errors.length > 0;
const errors = this.model.get('errors');
const hasErrors = errors && errors.length > 0;
const hasAttachments = attachments && attachments.length > 0;
const hasBody = this.hasTextContents();
@ -469,8 +469,7 @@
avatar: (contact && contact.getAvatar()),
profileName: (contact && contact.getProfileName()),
innerBubbleClasses: this.isImageWithoutCaption() ? '' : 'with-tail',
// TODO: Turn this on when we're ready to enable sending quoted replies
hoverIcon: false, // !hasErrors,
hoverIcon: !hasErrors,
hasAttachments,
reply: i18n('replyToMessage'),
}, this.render_partials()));