git ssb

0+

ev / 0qc



Commit 4900bfb0b9703e05ea09ad735590650aa536d492

fix compose

Ev Bogue committed on 3/13/2019, 10:27:46 PM
Parent: 97b67017a4dd029fc7f64c7bc120a90451c6e24b

Files changed

compose.jschanged
compose.jsView
@@ -122,9 +122,8 @@
122122
123123 if (opts.recps)
124124 msg.value.private = true
125125
126- console.log(msg)
127126 if (opts.type == 'post')
128127 var header = tools.header(msg)
129128 if (opts.root)
130129 var rootMsg = h('span', 're: ', tools.messageLink(opts.root))
@@ -142,21 +141,21 @@
142141 console.log('Published!', msg)
143142 if (opts.type == 'edit') {
144143 var message = document.getElementById(opts.branch.substring(0,44))
145144 fallback.messageText = msg.value.content.text
146- var editBody = h('div.messageContent',
145 + var editBody = h('div.message__body',
147146 tools.timestamp(msg, {edited: true}),
148147 h('div', tools.markdown(msg.value.content.text))
149148 )
150-
151- message.replaceChild(editBody, message.firstChild.childNodes[message.childNodes.length - 1])
149 +
150 + message.firstChild.replaceChild(editBody, message.firstChild.childNodes[message.childNodes.length - 1])
152151 editBody.parentNode.appendChild(fallback.buttons)
153152 } else {
154153 if (opts.branch)
155154 cancel = document.getElementById('re:' + opts.branch.substring(0,44))
156155 else
157156 cancel = document.getElementById('composer')
158- cancel.parentNode.removeChild(cancel)
157 + cancel.parentNode.removeChild(cancel)
159158 }
160159 })
161160 }
162161 }

Built with git-ssb-web