diff --git a/app/sql.js b/app/sql.js index ff004629d..29a34535e 100644 --- a/app/sql.js +++ b/app/sql.js @@ -749,6 +749,10 @@ async function initialize({ configDir, key, messages }) { } async function close() { + if (!db) { + return; + } + const dbRef = db; db = null; await dbRef.close(); 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 6f0c8f1a1..a13eae124 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -55,6 +55,7 @@ }))(); window.getInboxCollection = () => inboxCollection; + window.getConversations = () => conversations; window.ConversationController = { get(id) { diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 0370e156b..eaea8cbb5 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -1,6 +1,7 @@ /* global ConversationController, extension, + getConversations, getInboxCollection, i18n, Whisper, @@ -104,8 +105,8 @@ }, setupLeftPane() { // Here we set up a full redux store with initial state for our LeftPane Root - const inboxCollection = getInboxCollection(); - const conversations = inboxCollection.map( + const convoCollection = getConversations(); + const conversations = convoCollection.map( conversation => conversation.cachedProps ); const initialState = { @@ -145,19 +146,19 @@ this.openConversationAction = openConversationExternal; - this.listenTo(inboxCollection, 'remove', conversation => { + this.listenTo(convoCollection, 'remove', conversation => { const { id } = conversation || {}; conversationRemoved(id); }); - this.listenTo(inboxCollection, 'add', conversation => { + this.listenTo(convoCollection, 'add', conversation => { const { id, cachedProps } = conversation || {}; conversationAdded(id, cachedProps); }); - this.listenTo(inboxCollection, 'change', conversation => { + this.listenTo(convoCollection, 'change', conversation => { const { id, cachedProps } = conversation || {}; conversationChanged(id, cachedProps); }); - this.listenTo(inboxCollection, 'reset', removeAllConversations); + this.listenTo(convoCollection, 'reset', removeAllConversations); Whisper.events.on('messageExpired', messageExpired); Whisper.events.on('userChanged', userChanged); diff --git a/package.json b/package.json index 50ff41d29..b1f930416 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "Signal", "description": "Private messaging from your desktop", "repository": "https://github.com/signalapp/Signal-Desktop.git", - "version": "1.23.1", + "version": "1.23.2-beta.1", "license": "GPL-3.0", "author": { "name": "Open Whisper Systems", @@ -121,7 +121,7 @@ "asar": "0.14.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/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 8a7df1e1a..e3e9bf8cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2692,10 +2692,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"