Refactored ViewImage modal and made it automatically play animated gifs
Этот коммит содержится в:
@@ -769,3 +769,31 @@ export function getSuggestedCommands(command, suggestionId, component) {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function getFileInfo(filename) {
|
||||
const callName = 'getFileInfo' + filename;
|
||||
|
||||
if (isCallInProgress(callName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
callTracker[callName] = utils.getTimestamp();
|
||||
|
||||
client.getFileInfo(
|
||||
filename,
|
||||
(data) => {
|
||||
callTracker[callName] = 0;
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECIEVED_FILE_INFO,
|
||||
filename,
|
||||
info: data
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
callTracker[callName] = 0;
|
||||
|
||||
dispatchError(err, 'getFileInfo');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1076,7 +1076,9 @@ export function getFileInfo(filename, success, error) {
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'GET',
|
||||
success,
|
||||
success: (data) => {
|
||||
success(data);
|
||||
},
|
||||
error: function onError(xhr, status, err) {
|
||||
var e = handleError('getFileInfo', xhr, status, err);
|
||||
error(e);
|
||||
|
||||
@@ -37,6 +37,7 @@ export default {
|
||||
RECIEVED_STATUSES: null,
|
||||
RECIEVED_PREFERENCE: null,
|
||||
RECIEVED_PREFERENCES: null,
|
||||
RECIEVED_FILE_INFO: null,
|
||||
|
||||
RECIEVED_MSG: null,
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user