mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-17 11:51:32 +03:00
remove unused "load" treestore attribute
This commit is contained in:
parent
0ef3333095
commit
02a4057ba9
@ -9,11 +9,6 @@ module.exports =
|
||||
body:body
|
||||
kids:kids
|
||||
|
||||
setLoading: (state) ->
|
||||
TreeDispatcher.handleViewAction
|
||||
type:"set-load"
|
||||
load:state
|
||||
|
||||
loadKids: (path,kids) ->
|
||||
TreeDispatcher.handleServerAction
|
||||
type:"kids-load"
|
||||
@ -34,7 +29,7 @@ module.exports =
|
||||
|
||||
if path.slice(-1) is "/" then path = path.slice(0,-1)
|
||||
|
||||
TreePersistence.get path,query,(err,res) =>
|
||||
TreePersistence.get path,query,(err,res) =>
|
||||
switch query
|
||||
when "snip"
|
||||
@loadSnip path,res.snip
|
||||
@ -47,4 +42,4 @@ module.exports =
|
||||
setCurr: (path) ->
|
||||
TreeDispatcher.handleViewAction
|
||||
type:"set-curr"
|
||||
path:path
|
||||
path:path
|
||||
|
@ -9,7 +9,6 @@ recl = React.createClass
|
||||
module.exports = recl
|
||||
stateFromStore: ->
|
||||
body:TreeStore.getBody()
|
||||
load:TreeStore.getLoad()
|
||||
curr:TreeStore.getCurr()
|
||||
cont:TreeStore.getCont()
|
||||
|
||||
@ -30,9 +29,7 @@ module.exports = recl
|
||||
|
||||
getPath: (path) ->
|
||||
if not @state.cont[path]?
|
||||
TreeActions.setLoading true
|
||||
TreeActions.getPath path,=>
|
||||
TreeActions.setLoading false
|
||||
TreeActions.getPath path
|
||||
|
||||
render: ->
|
||||
parts = []
|
||||
@ -40,4 +37,4 @@ module.exports = recl
|
||||
parts.push (div {id:'body',key:"body"+@state.curr},
|
||||
(@state.body ? (div {className:"loading"}, (load {}, ""))))
|
||||
|
||||
(div {}, parts)
|
||||
(div {}, parts)
|
||||
|
@ -5,7 +5,6 @@ MessageDispatcher = require '../dispatcher/Dispatcher.coffee'
|
||||
_tree = {}
|
||||
_cont = {}
|
||||
_snip = {}
|
||||
_load = false
|
||||
_curr = ""
|
||||
|
||||
TreeStore = _.extend EventEmitter.prototype, {
|
||||
@ -41,10 +40,6 @@ TreeStore = _.extend EventEmitter.prototype, {
|
||||
|
||||
getCont: -> _cont
|
||||
|
||||
setLoad: (load) -> _load = load
|
||||
|
||||
getLoad: -> _load
|
||||
|
||||
mergePathToTree: (path,kids) ->
|
||||
_obj = {}
|
||||
@pathToObj path,_obj,kids
|
||||
@ -149,8 +144,5 @@ TreeStore.dispatchToken = MessageDispatcher.register (payload) ->
|
||||
when 'set-curr'
|
||||
TreeStore.setCurr action.path
|
||||
TreeStore.emitChange()
|
||||
when 'set-load'
|
||||
TreeStore.setLoad action.load
|
||||
TreeStore.emitChange()
|
||||
|
||||
module.exports = TreeStore
|
||||
|
Loading…
Reference in New Issue
Block a user