Merge branch 'master' of https://github.com/fluffypony/monero-core into fluffypony-master

This commit is contained in:
Ilya Kitaev 2016-06-21 11:09:19 +03:00
commit 30f0bce569
2 changed files with 23 additions and 20 deletions

View file

@ -43,7 +43,7 @@ ApplicationWindow {
property var currentItem
property bool whatIsEnable: false
property bool ctrlPressed: false
property bool rightPanelExpanded: true
property bool rightPanelExpanded: false
property bool osx: false
property alias persistentSettings : persistentSettings
property var wallet;

View file

@ -60,30 +60,33 @@ Item {
if (from == "" && phrase == "")
return;
if (appWindow.rightPanelExpanded) {
//! [requesting]
var req = new XMLHttpRequest;
req.open("GET", "https://api.twitter.com/1.1/search/tweets.json?from=" + from +
"&count=" + tweetsMaxCount + "&q=" + encodePhrase(phrase));
req.setRequestHeader("Authorization", "Bearer " + bearerToken);
req.onreadystatechange = function() {
status = req.readyState;
if (status === XMLHttpRequest.DONE) {
var objectArray = JSON.parse(req.responseText);
if (objectArray.errors !== undefined)
console.log("Error fetching tweets: " + objectArray.errors[0].message)
else {
for (var key in objectArray.statuses) {
var jsonObject = objectArray.statuses[key];
tweets.append(jsonObject);
var req = new XMLHttpRequest;
req.open("GET", "https://api.twitter.com/1.1/search/tweets.json?from=" + from +
"&count=" + tweetsMaxCount + "&q=" + encodePhrase(phrase));
req.setRequestHeader("Authorization", "Bearer " + bearerToken);
req.onreadystatechange = function() {
status = req.readyState;
if (status === XMLHttpRequest.DONE) {
var objectArray = JSON.parse(req.responseText);
if (objectArray.errors !== undefined)
console.log("Error fetching tweets: " + objectArray.errors[0].message)
else {
for (var key in objectArray.statuses) {
var jsonObject = objectArray.statuses[key];
tweets.append(jsonObject);
}
}
if (wasLoading == true)
wrapper.isLoaded()
}
if (wasLoading == true)
wrapper.isLoaded()
wasLoading = (status === XMLHttpRequest.LOADING);
}
wasLoading = (status === XMLHttpRequest.LOADING);
}
req.send();
req.send();
//! [requesting]
}
}