mirror of
https://github.com/twisterarmy/twister-react.git
synced 2025-01-11 15:38:00 +00:00
add account works somewhat
This commit is contained in:
parent
e4a378ad0a
commit
44931065da
@ -186,7 +186,6 @@ App = React.createClass({displayName: "App",
|
||||
key: this.state.accounts[i].name,
|
||||
bsStyle: this.state.accounts[i].name==this.state.activeAccount ? 'primary' : 'default',
|
||||
onClick: this.switchAccount.bind(this,this.state.accounts[i].name),
|
||||
href: "javascript:void(0);",
|
||||
eventKey: i
|
||||
}, this.state.accounts[i].name)
|
||||
);
|
||||
@ -233,7 +232,8 @@ App = React.createClass({displayName: "App",
|
||||
React.createElement("br", null),
|
||||
this.props.children && React.cloneElement(this.props.children, {
|
||||
accounts:this.state.accounts,
|
||||
activeAccount:this.state.activeAccount
|
||||
activeAccount:this.state.activeAccount,
|
||||
key:this.state.activeAccount
|
||||
})
|
||||
)
|
||||
)
|
||||
|
@ -30142,11 +30142,13 @@ TwisterAccount.prototype._signAndPublish = function(post_ori,cbfunc){
|
||||
|
||||
//console.log("new post msg after",status)
|
||||
|
||||
if(status){
|
||||
post.lastk = status.getId();
|
||||
}
|
||||
|
||||
post.height = info.blocks-1;
|
||||
post.n = thisAccount._name;
|
||||
post.k = newid;
|
||||
post.lastk = status.getId();
|
||||
post.time = Math.round(Date.now()/1000);
|
||||
|
||||
//console.log("new post will be",post)
|
||||
@ -32929,13 +32931,13 @@ TwisterAvatar.prototype._queryAndDo = function (cbfunc) {
|
||||
|
||||
} else {
|
||||
|
||||
thisResource._handleError({
|
||||
/*thisResource._handleError({
|
||||
message: "DHT resource is empty.",
|
||||
code: 32052
|
||||
})
|
||||
})*/
|
||||
thisResource._revisionNumber=0;
|
||||
thisResource._lastUpdate=Date.now()/1000;
|
||||
//cbfunc(thisResource);
|
||||
cbfunc(thisResource);
|
||||
|
||||
}
|
||||
|
||||
@ -33693,13 +33695,13 @@ TwisterProfile.prototype._queryAndDo = function (cbfunc) {
|
||||
|
||||
} else {
|
||||
|
||||
thisResource._handleError({
|
||||
/*thisResource._handleError({
|
||||
message: "DHT resource is empty.",
|
||||
code: 32052
|
||||
})
|
||||
})*/
|
||||
thisResource._revisionNumber=0;
|
||||
thisResource._lastUpdate=Date.now()/1000;
|
||||
//cbfunc(thisResource);
|
||||
cbfunc(thisResource);
|
||||
|
||||
}
|
||||
|
||||
@ -34951,12 +34953,12 @@ TwisterStream.prototype._queryAndDo = function (cbfunc) {
|
||||
|
||||
} else {
|
||||
|
||||
thisResource._handleError({
|
||||
/*thisResource._handleError({
|
||||
message: "DHT resource is empty.",
|
||||
code: 32052
|
||||
})
|
||||
})*/
|
||||
thisResource._updateInProgress = false;
|
||||
//cbfunc(null);
|
||||
cbfunc(null);
|
||||
|
||||
}
|
||||
|
||||
@ -35135,12 +35137,12 @@ TwisterStream.prototype._doPost = function (id, cbfunc, querySettings) {
|
||||
|
||||
} else {
|
||||
|
||||
thisResource._handleError({
|
||||
/*thisResource._handleError({
|
||||
message: "DHT resource is empty.",
|
||||
code: 32052
|
||||
})
|
||||
})*/
|
||||
thisResource._updateInProgress = false;
|
||||
//cbfunc(null);
|
||||
cbfunc(null);
|
||||
|
||||
}
|
||||
|
||||
@ -35157,6 +35159,8 @@ TwisterStream.prototype._doPost = function (id, cbfunc, querySettings) {
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
cbfunc(null);
|
||||
}
|
||||
|
||||
};
|
||||
@ -35165,13 +35169,17 @@ TwisterStream.prototype._doUntil = function (cbfunc, querySettings) {
|
||||
|
||||
this._checkQueryAndDo(function doUntil(post){
|
||||
|
||||
var retVal = cbfunc(post);
|
||||
if(post){
|
||||
|
||||
var retVal = cbfunc(post);
|
||||
|
||||
if(post.getLastId() && retVal!==false ) {
|
||||
if(post.getLastId() && retVal!==false ) {
|
||||
|
||||
post.doPreviousPost(doUntil, querySettings);
|
||||
post.doPreviousPost(doUntil, querySettings);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, querySettings);
|
||||
|
||||
|
@ -185,7 +185,6 @@ App = React.createClass({
|
||||
key={this.state.accounts[i].name}
|
||||
bsStyle={this.state.accounts[i].name==this.state.activeAccount ? 'primary' : 'default'}
|
||||
onClick={this.switchAccount.bind(this,this.state.accounts[i].name)}
|
||||
href="javascript:void(0);"
|
||||
eventKey={i}
|
||||
>{this.state.accounts[i].name}</MenuItem>
|
||||
);
|
||||
@ -232,7 +231,8 @@ App = React.createClass({
|
||||
<br/>
|
||||
{this.props.children && React.cloneElement(this.props.children, {
|
||||
accounts:this.state.accounts,
|
||||
activeAccount:this.state.activeAccount
|
||||
activeAccount:this.state.activeAccount,
|
||||
key:this.state.activeAccount
|
||||
})}
|
||||
</Col>
|
||||
</Row>
|
||||
|
Loading…
Reference in New Issue
Block a user