Commit e39458cf79ac14e9ae06c78494db0453c35f8f9b
whoops, don't delete message when cancelling preview
Matt McKegg committed on 10/18/2017, 2:58:10 AMParent: 439b2fd655c4e2b043b509caf646206a3e60f528
Files changed
modules/message/html/compose.js | changed |
modules/message/html/compose.js | ||
---|---|---|
@@ -144,9 +144,9 @@ | ||
144 | 144 | } |
145 | 145 | // TODO: when no emoji typed, list some default ones |
146 | 146 | cb(null, api.emoji.sync.names().filter(function (name) { |
147 | 147 | return name.slice(0, word.length) === word |
148 | - }).map(function (emoji) { | |
148 | + }).slice(0, 100).map(function (emoji) { | |
149 | 149 | return { |
150 | 150 | image: api.emoji.sync.url(emoji), |
151 | 151 | title: emoji, |
152 | 152 | subtitle: emoji, |
@@ -199,9 +199,9 @@ | ||
199 | 199 | detail: err.message |
200 | 200 | }) |
201 | 201 | } |
202 | 202 | } else { |
203 | - textArea.value = '' | |
203 | + if (msg) textArea.value = '' | |
204 | 204 | if (cb) cb(null, msg) |
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
Built with git-ssb-web