Merge pull request #449 from rgarmsen2295/mm-1933
Multiple fixes for IE10 & Edge browsers primarily due to aggressive ajax call caching on the browser
Этот коммит содержится в:
@@ -102,7 +102,7 @@ module.exports = React.createClass({
|
|||||||
currentUserCss = "current--user";
|
currentUserCss = "current--user";
|
||||||
}
|
}
|
||||||
|
|
||||||
var timestamp = UserStore.getCurrentUser().update_at;
|
var timestamp = UserStore.getProfile(post.user_id).update_at;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -252,6 +252,7 @@ module.exports.revokeSession = function(altId, success, error) {
|
|||||||
|
|
||||||
module.exports.getSessions = function(userId, success, error) {
|
module.exports.getSessions = function(userId, success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/users/' + userId + '/sessions',
|
url: '/api/v1/users/' + userId + '/sessions',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
@@ -282,6 +283,7 @@ module.exports.getMeSynchronous = function(success, error) {
|
|||||||
var currentUser = null;
|
var currentUser = null;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: false,
|
async: false,
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/users/me',
|
url: '/api/v1/users/me',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
@@ -293,14 +295,11 @@ module.exports.getMeSynchronous = function(success, error) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function onError(xhr, status, err) {
|
error: function onError(xhr, status, err) {
|
||||||
var ieChecker = window.navigator.userAgent; // This and the condition below is used to check specifically for browsers IE10 & 11 to suppress a 200 'OK' error from appearing on login
|
|
||||||
if (xhr.status !== 200 || !(ieChecker.indexOf('Trident/7.0') > 0 || ieChecker.indexOf('Trident/6.0') > 0)) {
|
|
||||||
if (error) {
|
if (error) {
|
||||||
var e = handleError('getMeSynchronous', xhr, status, err);
|
var e = handleError('getMeSynchronous', xhr, status, err);
|
||||||
error(e);
|
error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return currentUser;
|
return currentUser;
|
||||||
@@ -566,6 +565,7 @@ module.exports.updateLastViewedAt = function(channelId, success, error) {
|
|||||||
|
|
||||||
function getChannels(success, error) {
|
function getChannels(success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/channels/',
|
url: '/api/v1/channels/',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -581,6 +581,7 @@ module.exports.getChannels = getChannels;
|
|||||||
|
|
||||||
module.exports.getChannel = function(id, success, error) {
|
module.exports.getChannel = function(id, success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/channels/' + id + '/',
|
url: '/api/v1/channels/' + id + '/',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -610,6 +611,7 @@ module.exports.getMoreChannels = function(success, error) {
|
|||||||
|
|
||||||
function getChannelCounts(success, error) {
|
function getChannelCounts(success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/channels/counts',
|
url: '/api/v1/channels/counts',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -653,6 +655,7 @@ module.exports.executeCommand = function(channelId, command, suggest, success, e
|
|||||||
|
|
||||||
module.exports.getPosts = function(channelId, offset, limit, success, error, complete) {
|
module.exports.getPosts = function(channelId, offset, limit, success, error, complete) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/channels/' + channelId + '/posts/' + offset + '/' + limit,
|
url: '/api/v1/channels/' + channelId + '/posts/' + offset + '/' + limit,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -668,6 +671,7 @@ module.exports.getPosts = function(channelId, offset, limit, success, error, com
|
|||||||
|
|
||||||
module.exports.getPost = function(channelId, postId, success, error) {
|
module.exports.getPost = function(channelId, postId, success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/channels/' + channelId + '/post/' + postId,
|
url: '/api/v1/channels/' + channelId + '/post/' + postId,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@@ -791,6 +795,7 @@ module.exports.removeChannelMember = function(id, data, success, error) {
|
|||||||
|
|
||||||
module.exports.getProfiles = function(success, error) {
|
module.exports.getProfiles = function(success, error) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
url: '/api/v1/users/profiles',
|
url: '/api/v1/users/profiles',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user