diff --git a/aptly.sh b/aptly.sh index ed03ea5d5..a761b806f 100755 --- a/aptly.sh +++ b/aptly.sh @@ -26,8 +26,8 @@ echo "Releasing $NAME build version $VERSION" REPO=signal-desktop -CURRENT=artful -PREVIOUS=xenial +CURRENT=xenial +# PREVIOUS=xenial ENDPOINT=signal-desktop-apt # Matches endpoint name in .aptly.conf SNAPSHOT=signal-desktop_v$VERSION GPG_KEYID=57F6FB06 @@ -46,7 +46,7 @@ aptly snapshot create $SNAPSHOT from repo $REPO # these update already-published repos, run every time after that # https://www.aptly.info/doc/aptly/publish/switch/ aptly publish switch -gpg-key=$GPG_KEYID $CURRENT $SNAPSHOT -aptly publish switch -gpg-key=$GPG_KEYID $PREVIOUS $SNAPSHOT +# aptly publish switch -gpg-key=$GPG_KEYID $PREVIOUS $SNAPSHOT aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $CURRENT s3:$ENDPOINT: $SNAPSHOT -aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $PREVIOUS s3:$ENDPOINT: $SNAPSHOT +# aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $PREVIOUS s3:$ENDPOINT: $SNAPSHOT diff --git a/js/conversation_controller.js b/js/conversation_controller.js index eb961c680..8c017e56d 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -59,41 +59,6 @@ window.getInboxCollection = () => inboxCollection; window.getConversations = () => conversations; - const contactCollection = new (Backbone.Collection.extend({ - initialize() { - this.on( - 'change:timestamp change:name change:number change:profileName', - this.sort - ); - - this.listenTo( - conversations, - 'add change:active_at change:friendRequestStatus', - this.addActive - ); - this.listenTo(conversations, 'remove', this.remove); - this.listenTo(conversations, 'reset', () => this.reset([])); - - this.collator = new Intl.Collator(); - }, - comparator(m1, m2) { - const title1 = m1.getTitle().toLowerCase(); - const title2 = m2.getTitle().toLowerCase(); - return this.collator.compare(title1, title2); - }, - addActive(model) { - // We only want models which we are friends with - if (model.isFriend() && !model.isMe()) { - this.add(model); - model.updateLastMessage(); - } else { - this.remove(model); - } - }, - }))(); - - window.getContactCollection = () => contactCollection; - window.ConversationController = { get(id) { if (!this._initialFetchComplete) { diff --git a/js/views/conversation_list_view.js b/js/views/conversation_list_view.js index 0a69c78bf..6d49ce854 100644 --- a/js/views/conversation_list_view.js +++ b/js/views/conversation_list_view.js @@ -1,4 +1,4 @@ -/* global Whisper, getInboxCollection, getContactCollection, $ */ +/* global Whisper, getInboxCollection, $ */ // eslint-disable-next-line func-names (function() { @@ -68,11 +68,4 @@ } }, }); - - Whisper.ConversationContactListView = Whisper.ConversationListView.extend({ - itemView: Whisper.ConversationContactListItemView, - getCollection() { - return getContactCollection(); - }, - }); })(); diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 6c93be31f..98775fb32 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -1,5 +1,6 @@ /* global extension, + ConversationController getConversations, getInboxCollection, i18n, diff --git a/package.json b/package.json index 6cec2607d..4c3afd592 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "axios": "0.18.0", "bower": "1.8.2", "chai": "4.1.2", - "electron": "4.1.1", + "electron": "4.1.2", "electron-builder": "20.33.1", "electron-icon-maker": "0.0.3", "eslint": "4.14.0", diff --git a/ts/components/ConversationListItem.tsx b/ts/components/ConversationListItem.tsx index 9c08c4d92..65c7d60f0 100644 --- a/ts/components/ConversationListItem.tsx +++ b/ts/components/ConversationListItem.tsx @@ -242,7 +242,7 @@ export class ConversationListItem extends React.PureComponent<Props> { isSelected, showFriendRequestIndicator, isBlocked, - style + style, } = this.props; const triggerId = `${phoneNumber}-ctxmenu-${Date.now()}`; @@ -260,12 +260,14 @@ export class ConversationListItem extends React.PureComponent<Props> { style={style} className={classNames( 'module-conversation-list-item', - unreadCount > 0 ? 'module-conversation-list-item--has-unread' : null, + unreadCount > 0 + ? 'module-conversation-list-item--has-unread' + : null, isSelected ? 'module-conversation-list-item--is-selected' : null, showFriendRequestIndicator ? 'module-conversation-list-item--has-friend-request' : null, - isBlocked ? 'module-conversation-list-item--is-blocked' : null + isBlocked ? 'module-conversation-list-item--is-blocked' : null )} > {this.renderAvatar()} diff --git a/ts/components/conversation/ContactName.tsx b/ts/components/conversation/ContactName.tsx index abcc58cc8..641039566 100644 --- a/ts/components/conversation/ContactName.tsx +++ b/ts/components/conversation/ContactName.tsx @@ -21,19 +21,15 @@ export class ContactName extends React.Component<Props> { const shouldShowProfile = Boolean(profileName && !name); const profileElement = shouldShowProfile ? ( <span className={`${prefix}__profile-name`}> - ~<Emojify text={profileName || ''} i18n={i18n} /> + <Emojify text={profileName || ''} i18n={i18n} /> </span> ) : null; return ( - <span className={prefix}> + <span className={prefix} dir="auto"> {profileElement} - <span - title={phoneNumber} - className={shouldShowProfile ? `${prefix}__profile-number` : ''} - > - <Emojify text={title} i18n={i18n} /> - </span> + {shouldShowProfile ? ' ' : null} + <Emojify text={title} i18n={i18n} /> </span> ); } diff --git a/ts/state/selectors/search.ts b/ts/state/selectors/search.ts index e6285416b..4d6154246 100644 --- a/ts/state/selectors/search.ts +++ b/ts/state/selectors/search.ts @@ -68,7 +68,7 @@ export const getSearchResults = createSelector( state.conversations.map(id => { const value = lookup[id]; - const friend = value && value.isFriend ? { ...value} : null; + const friend = value && value.isFriend ? { ...value } : null; if (friend && id === selectedConversation) { return { diff --git a/ts/types/PhoneNumber.ts b/ts/types/PhoneNumber.ts index 00bbeab88..444a7fd1c 100644 --- a/ts/types/PhoneNumber.ts +++ b/ts/types/PhoneNumber.ts @@ -34,12 +34,15 @@ export function normalize( function isValidNumber(number: string) { // Check if it's hex const isHex = number.replace(/[\s]*/g, '').match(/^[0-9a-fA-F]+$/); - if (!isHex) return false; + if (!isHex) { + return false; + } // Check if the pubkey length is 33 and leading with 05 or of length 32 const len = number.length; - if ((len !== 33 * 2 || !/^05/.test(number)) && len !== 32 * 2) + if ((len !== 33 * 2 || !/^05/.test(number)) && len !== 32 * 2) { return false; + } return true; } diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 6b00fb2a4..2e61480a3 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -164,7 +164,7 @@ "rule": "jQuery-load(", "path": "js/conversation_controller.js", "line": " async load() {", - "lineNumber": 177, + "lineNumber": 178, "reasonCategory": "falseMatch", "updated": "2018-10-02T21:00:44.007Z" }, @@ -172,7 +172,7 @@ "rule": "jQuery-load(", "path": "js/conversation_controller.js", "line": " this._initialPromise = load();", - "lineNumber": 212, + "lineNumber": 213, "reasonCategory": "falseMatch", "updated": "2018-10-02T21:00:44.007Z" }, @@ -501,7 +501,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " let $el = this.$(`#${id}`);", - "lineNumber": 28, + "lineNumber": 29, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -510,7 +510,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " $el.prependTo(this.el);", - "lineNumber": 37, + "lineNumber": 38, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -519,7 +519,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.message').text(message);", - "lineNumber": 49, + "lineNumber": 50, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -528,7 +528,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " el: this.$('.conversation-stack'),", - "lineNumber": 66, + "lineNumber": 67, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -537,7 +537,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " this.appLoadingScreen.$el.prependTo(this.el);", - "lineNumber": 73, + "lineNumber": 74, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -546,7 +546,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " .append(this.networkStatusView.render().el);", - "lineNumber": 88, + "lineNumber": 89, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -555,7 +555,7 @@ "rule": "jQuery-prependTo(", "path": "js/views/inbox_view.js", "line": " banner.$el.prependTo(this.$el);", - "lineNumber": 92, + "lineNumber": 93, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -564,7 +564,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 166, + "lineNumber": 167, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -573,7 +573,7 @@ "rule": "jQuery-append(", "path": "js/views/inbox_view.js", "line": " this.$('.left-pane-placeholder').append(this.leftPaneView.el);", - "lineNumber": 166, + "lineNumber": 167, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -582,7 +582,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.placeholder').length) {", - "lineNumber": 207, + "lineNumber": 208, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -591,7 +591,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('#header, .gutter').addClass('inactive');", - "lineNumber": 211, + "lineNumber": 212, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -600,7 +600,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation-stack').addClass('inactive');", - "lineNumber": 215, + "lineNumber": 216, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -609,7 +609,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .menu').trigger('close');", - "lineNumber": 217, + "lineNumber": 218, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -618,7 +618,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " if (e && this.$(e.target).closest('.capture-audio').length > 0) {", - "lineNumber": 236, + "lineNumber": 237, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -627,7 +627,7 @@ "rule": "jQuery-$(", "path": "js/views/inbox_view.js", "line": " this.$('.conversation:first .recorder').trigger('close');", - "lineNumber": 239, + "lineNumber": 240, "reasonCategory": "usageTrusted", "updated": "2019-03-08T23:49:08.796Z", "reasonDetail": "Protected from arbitrary input" @@ -2961,7 +2961,7 @@ "rule": "jQuery-append(", "path": "node_modules/electron/electron.d.ts", "line": " append(menuItem: MenuItem): void;", - "lineNumber": 3431, + "lineNumber": 3433, "reasonCategory": "falseMatch", "updated": "2019-02-22T01:08:09.603Z" }, diff --git a/yarn.lock b/yarn.lock index 256e2754a..4af5d1a83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1146,9 +1146,10 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-crc32@^0.2.1: +buffer-crc32@0.2.13, buffer-crc32@^0.2.1: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= buffer-equal@0.0.1: version "0.0.1" @@ -2700,10 +2701,10 @@ electron-updater@3.2.0: semver "^5.6.0" source-map-support "^0.5.9" -electron@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-4.1.1.tgz#dc9343ba829cabbf01364761e72796f766704184" - integrity sha512-ABIEXTw55eiCW30a6F8fWLHL0QeH+yK3JgZpvTZZWLnkO5/SmG38avMxRhKOUQstRpYb+EEpE8IAM2DVOaTvtw== +electron@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/electron/-/electron-4.1.2.tgz#dc8be0f219c73d60a97675d6d3c5b040c4f50513" + integrity sha512-QWz298CaH2jLyFVje01sj4fSEdXJj+oKVw2jNUovrhZE5jmFE4cr/KqZ7iHX00DG6AwmDF4W1Xrv0V+aQOkieQ== dependencies: "@types/node" "^10.12.18" electron-download "^4.1.0"