git ssb

16+

Dominic / patchbay



Commit 1fd3c2d9148ba9ea22b04eabc592afe3ff16dabe

use message_compose via firstPlug not decorate

Dominic Tarr committed on 5/20/2016, 8:06:28 PM
Parent: 7b8459c024b593664fa22d32c9b9bcccfe02a2fa

Files changed

modules/compose.jschanged
modules/main.jschanged
modules/thread.jschanged
modules/compose.jsView
@@ -10,11 +10,9 @@
1010 exports.message_content = []
1111 exports.message_confirm = []
1212
1313 //this decorator expects to be the first
14-exports.message_compose = function (el, meta, sbot) {
15- if(el) return el
16-
14+exports.message_compose = function (meta, sbot) {
1715 meta = meta || {}
1816 if(!meta.type) throw new Error('message must have type')
1917 var ta = h('textarea')
2018 //h('pre.editable.fixed', 'HELLO')
@@ -64,4 +62,5 @@
6462
6563
6664
6765
66+
modules/main.jsView
@@ -7,11 +7,9 @@
77 exports.screen_view = function (path, sbot) {
88 if(path === '/') {
99 var content = h('div.column')
1010 var div = h('div.column', {style: {'overflow':'auto'}},
11- u.decorate(exports.message_compose, {type: 'post'}, function (d, e, v) {
12- return d(e, v, sbot)
13- }),
11+ u.firstPlug(exports.message_compose, {type: 'post'}, sbot),
1412 content
1513 )
1614 var render = ui.createRenderers(exports.message_render, sbot)
1715
@@ -37,4 +35,5 @@
3735
3836
3937
4038
39+
modules/thread.jsView
@@ -64,12 +64,9 @@
6464 if(recps && thread[0].value.private)
6565 meta.recps = recps
6666
6767 div.appendChild(
68- h('div',
69- u.decorate(exports.message_compose, meta, function (d, e, v) {
70- return d(e, v, sbot)
71- }))
68+ h('div', u.firstPlug(exports.message_compose, meta, sbot))
7269 )
7370 })
7471
7572 return div
@@ -81,7 +78,4 @@
8178 exports.message_compose = []
8279 exports.message_unbox = []
8380
8481
85-
86-
87-

Built with git-ssb-web