mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
don't process stale query responses
This commit is contained in:
parent
9809515853
commit
182050c4b9
1 changed files with 3 additions and 1 deletions
|
@ -429,6 +429,7 @@ Window {
|
|||
suggestions.get(suggestions.count - 1).drillDownToPlace = true; // Don't change raw place object (in allStories).
|
||||
}
|
||||
}
|
||||
property int requestId: 0;
|
||||
function getUserStoryPage(pageNumber, cb) { // cb(error) after all pages of domain data have been added to model
|
||||
var options = [
|
||||
'include_actions=' + selectedTab.includeActions,
|
||||
|
@ -436,8 +437,9 @@ Window {
|
|||
'page=' + pageNumber
|
||||
];
|
||||
var url = metaverseBase + 'user_stories?' + options.join('&');
|
||||
var thisRequestId = ++requestId;
|
||||
getRequest(url, function (error, data) {
|
||||
if (handleError(url, error, data, cb)) {
|
||||
if ((thisRequestId !== requestId) || handleError(url, error, data, cb)) {
|
||||
return;
|
||||
}
|
||||
var stories = data.user_stories.map(function (story) { // explicit single-argument function
|
||||
|
|
Loading…
Reference in a new issue