mirror of
https://github.com/twisterarmy/twister-react.git
synced 2025-08-26 05:41:57 +00:00
conversation fix
This commit is contained in:
parent
14759bebe5
commit
451baa38b9
@ -3,7 +3,11 @@ module.exports = SetIntervalMixin = {
|
|||||||
this.intervals = [];
|
this.intervals = [];
|
||||||
},
|
},
|
||||||
setInterval: function() {
|
setInterval: function() {
|
||||||
|
if (arguments[1]) {
|
||||||
this.intervals.push(setInterval.apply(null, arguments));
|
this.intervals.push(setInterval.apply(null, arguments));
|
||||||
|
} else {
|
||||||
|
console.log("setInterval requested with malformed interval argument");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
this.intervals.map(clearInterval);
|
this.intervals.map(clearInterval);
|
||||||
|
@ -4,6 +4,7 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
|||||||
var StreamMixin = require("../common/StreamMixin.js");
|
var StreamMixin = require("../common/StreamMixin.js");
|
||||||
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
||||||
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
||||||
|
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
|
||||||
|
|
||||||
var ReactBootstrap = require('react-bootstrap')
|
var ReactBootstrap = require('react-bootstrap')
|
||||||
, NavItem = ReactBootstrap.NavItem
|
, NavItem = ReactBootstrap.NavItem
|
||||||
@ -17,6 +18,7 @@ var ReactBootstrap = require('react-bootstrap')
|
|||||||
module.exports = Timeline = React.createClass({displayName: "Timeline",
|
module.exports = Timeline = React.createClass({displayName: "Timeline",
|
||||||
|
|
||||||
mixins:[
|
mixins:[
|
||||||
|
AppSettingsMixin,
|
||||||
StreamMixin,
|
StreamMixin,
|
||||||
SetIntervalMixin,
|
SetIntervalMixin,
|
||||||
SafeStateChangeMixin,
|
SafeStateChangeMixin,
|
||||||
@ -38,7 +40,7 @@ module.exports = Timeline = React.createClass({displayName: "Timeline",
|
|||||||
|
|
||||||
//console.log(this.state.username+":post"+this.state.postid)
|
//console.log(this.state.username+":post"+this.state.postid)
|
||||||
|
|
||||||
if (!outdatedLimit) {outdatedLimit=this.props.pollInterval/2;}
|
if (!outdatedLimit) {outdatedLimit=this.state.appSettings.pollInterval/2;}
|
||||||
|
|
||||||
var thisComponent = this;
|
var thisComponent = this;
|
||||||
var thisUsername = this.state.username;
|
var thisUsername = this.state.username;
|
||||||
@ -75,8 +77,8 @@ module.exports = Timeline = React.createClass({displayName: "Timeline",
|
|||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
|
|
||||||
this.updatePosts(2*this.props.pollInterval);
|
this.updatePosts(2*this.state.appSettings.pollInterval);
|
||||||
this.setInterval(this.updatePosts, this.props.pollInterval*1000);
|
this.setInterval(this.updatePosts, this.state.appSettings.pollInterval*1000);
|
||||||
|
|
||||||
},
|
},
|
||||||
onnewpostbyuser: function (event) {
|
onnewpostbyuser: function (event) {
|
||||||
|
@ -702,7 +702,11 @@ module.exports = SetIntervalMixin = {
|
|||||||
this.intervals = [];
|
this.intervals = [];
|
||||||
},
|
},
|
||||||
setInterval: function() {
|
setInterval: function() {
|
||||||
|
if (arguments[1]) {
|
||||||
this.intervals.push(setInterval.apply(null, arguments));
|
this.intervals.push(setInterval.apply(null, arguments));
|
||||||
|
} else {
|
||||||
|
console.log("setInterval requested with malformed interval argument");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
this.intervals.map(clearInterval);
|
this.intervals.map(clearInterval);
|
||||||
@ -1055,6 +1059,7 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
|||||||
var StreamMixin = require("../common/StreamMixin.js");
|
var StreamMixin = require("../common/StreamMixin.js");
|
||||||
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
||||||
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
||||||
|
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
|
||||||
|
|
||||||
var ReactBootstrap = require('react-bootstrap')
|
var ReactBootstrap = require('react-bootstrap')
|
||||||
, NavItem = ReactBootstrap.NavItem
|
, NavItem = ReactBootstrap.NavItem
|
||||||
@ -1068,6 +1073,7 @@ var ReactBootstrap = require('react-bootstrap')
|
|||||||
module.exports = Timeline = React.createClass({displayName: "Timeline",
|
module.exports = Timeline = React.createClass({displayName: "Timeline",
|
||||||
|
|
||||||
mixins:[
|
mixins:[
|
||||||
|
AppSettingsMixin,
|
||||||
StreamMixin,
|
StreamMixin,
|
||||||
SetIntervalMixin,
|
SetIntervalMixin,
|
||||||
SafeStateChangeMixin,
|
SafeStateChangeMixin,
|
||||||
@ -1089,7 +1095,7 @@ module.exports = Timeline = React.createClass({displayName: "Timeline",
|
|||||||
|
|
||||||
//console.log(this.state.username+":post"+this.state.postid)
|
//console.log(this.state.username+":post"+this.state.postid)
|
||||||
|
|
||||||
if (!outdatedLimit) {outdatedLimit=this.props.pollInterval/2;}
|
if (!outdatedLimit) {outdatedLimit=this.state.appSettings.pollInterval/2;}
|
||||||
|
|
||||||
var thisComponent = this;
|
var thisComponent = this;
|
||||||
var thisUsername = this.state.username;
|
var thisUsername = this.state.username;
|
||||||
@ -1126,8 +1132,8 @@ module.exports = Timeline = React.createClass({displayName: "Timeline",
|
|||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
|
|
||||||
this.updatePosts(2*this.props.pollInterval);
|
this.updatePosts(2*this.state.appSettings.pollInterval);
|
||||||
this.setInterval(this.updatePosts, this.props.pollInterval*1000);
|
this.setInterval(this.updatePosts, this.state.appSettings.pollInterval*1000);
|
||||||
|
|
||||||
},
|
},
|
||||||
onnewpostbyuser: function (event) {
|
onnewpostbyuser: function (event) {
|
||||||
@ -1147,7 +1153,7 @@ module.exports = Timeline = React.createClass({displayName: "Timeline",
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},{"../common/EventListenerMixin.js":3,"../common/Postboard.js":6,"../common/SafeStateChangeMixin.js":9,"../common/SetIntervalMixin.js":10,"../common/StreamMixin.js":11,"react":291,"react-bootstrap":71}],15:[function(require,module,exports){
|
},{"../common/AppSettingsMixin.js":2,"../common/EventListenerMixin.js":3,"../common/Postboard.js":6,"../common/SafeStateChangeMixin.js":9,"../common/SetIntervalMixin.js":10,"../common/StreamMixin.js":11,"react":291,"react-bootstrap":71}],15:[function(require,module,exports){
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
||||||
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
||||||
|
@ -31901,19 +31901,19 @@ TwisterPubKey.prototype.verifySignature = function (message_ori, signature_ori,
|
|||||||
|
|
||||||
message = bencode.encode(message);
|
message = bencode.encode(message);
|
||||||
|
|
||||||
signature = new Buffer(signature, 'hex');
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
signature = new Buffer(signature, 'hex');
|
||||||
|
try {
|
||||||
var retVal = Bitcoin.Message.verify(thisPubKey.getAddress(), signature, message, twister_network);
|
var retVal = Bitcoin.Message.verify(thisPubKey.getAddress(), signature, message, twister_network);
|
||||||
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
||||||
var retVal = false;
|
var retVal = false;
|
||||||
|
thisResource._handleError({message:"verification went sideways"});
|
||||||
thisResource._handleError({message:message});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch(e) {
|
||||||
|
var retVal = false;
|
||||||
|
thisResource._handleError({message:"signature is malformed"})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var compTime = Date.now()-startTime;
|
var compTime = Date.now()-startTime;
|
||||||
|
|
||||||
|
@ -3,7 +3,11 @@ module.exports = SetIntervalMixin = {
|
|||||||
this.intervals = [];
|
this.intervals = [];
|
||||||
},
|
},
|
||||||
setInterval: function() {
|
setInterval: function() {
|
||||||
|
if (arguments[1]) {
|
||||||
this.intervals.push(setInterval.apply(null, arguments));
|
this.intervals.push(setInterval.apply(null, arguments));
|
||||||
|
} else {
|
||||||
|
console.log("setInterval requested with malformed interval argument");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
this.intervals.map(clearInterval);
|
this.intervals.map(clearInterval);
|
||||||
|
@ -4,6 +4,7 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js");
|
|||||||
var StreamMixin = require("../common/StreamMixin.js");
|
var StreamMixin = require("../common/StreamMixin.js");
|
||||||
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
|
||||||
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
var EventListenerMixin = require('../common/EventListenerMixin.js');
|
||||||
|
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
|
||||||
|
|
||||||
var ReactBootstrap = require('react-bootstrap')
|
var ReactBootstrap = require('react-bootstrap')
|
||||||
, NavItem = ReactBootstrap.NavItem
|
, NavItem = ReactBootstrap.NavItem
|
||||||
@ -17,6 +18,7 @@ var ReactBootstrap = require('react-bootstrap')
|
|||||||
module.exports = Timeline = React.createClass({
|
module.exports = Timeline = React.createClass({
|
||||||
|
|
||||||
mixins:[
|
mixins:[
|
||||||
|
AppSettingsMixin,
|
||||||
StreamMixin,
|
StreamMixin,
|
||||||
SetIntervalMixin,
|
SetIntervalMixin,
|
||||||
SafeStateChangeMixin,
|
SafeStateChangeMixin,
|
||||||
@ -38,7 +40,7 @@ module.exports = Timeline = React.createClass({
|
|||||||
|
|
||||||
//console.log(this.state.username+":post"+this.state.postid)
|
//console.log(this.state.username+":post"+this.state.postid)
|
||||||
|
|
||||||
if (!outdatedLimit) {outdatedLimit=this.props.pollInterval/2;}
|
if (!outdatedLimit) {outdatedLimit=this.state.appSettings.pollInterval/2;}
|
||||||
|
|
||||||
var thisComponent = this;
|
var thisComponent = this;
|
||||||
var thisUsername = this.state.username;
|
var thisUsername = this.state.username;
|
||||||
@ -75,8 +77,8 @@ module.exports = Timeline = React.createClass({
|
|||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
|
|
||||||
this.updatePosts(2*this.props.pollInterval);
|
this.updatePosts(2*this.state.appSettings.pollInterval);
|
||||||
this.setInterval(this.updatePosts, this.props.pollInterval*1000);
|
this.setInterval(this.updatePosts, this.state.appSettings.pollInterval*1000);
|
||||||
|
|
||||||
},
|
},
|
||||||
onnewpostbyuser: function (event) {
|
onnewpostbyuser: function (event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user