mirror of https://github.com/vector-im/riot-web
Merge pull request #734 from matrix-org/luke/fix-resend
Fix resend bar and "send anyway" in UDDpull/21833/head
commit
30eddf9fda
|
@ -18,18 +18,19 @@ var MatrixClientPeg = require('./MatrixClientPeg');
|
||||||
var dis = require('./dispatcher');
|
var dis = require('./dispatcher');
|
||||||
var sdk = require('./index');
|
var sdk = require('./index');
|
||||||
var Modal = require('./Modal');
|
var Modal = require('./Modal');
|
||||||
|
import { EventStatus } from 'matrix-js-sdk';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
resendUnsentEvents: function(room) {
|
resendUnsentEvents: function(room) {
|
||||||
room.getPendingEvents().filter(function(ev) {
|
room.getPendingEvents().filter(function(ev) {
|
||||||
return ev.status === Matrix.EventStatus.NOT_SENT;
|
return ev.status === EventStatus.NOT_SENT;
|
||||||
}).forEach(function(event) {
|
}).forEach(function(event) {
|
||||||
module.exports.resend(event);
|
module.exports.resend(event);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelUnsentEvents: function(room) {
|
cancelUnsentEvents: function(room) {
|
||||||
room.getPendingEvents().filter(function(ev) {
|
room.getPendingEvents().filter(function(ev) {
|
||||||
return ev.status === Matrix.EventStatus.NOT_SENT;
|
return ev.status === EventStatus.NOT_SENT;
|
||||||
}).forEach(function(event) {
|
}).forEach(function(event) {
|
||||||
module.exports.removeFromQueue(event);
|
module.exports.removeFromQueue(event);
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,6 +19,7 @@ import sdk from '../../../index';
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||||
|
import Resend from '../../../Resend';
|
||||||
|
|
||||||
function DeviceListEntry(props) {
|
function DeviceListEntry(props) {
|
||||||
const {userId, device} = props;
|
const {userId, device} = props;
|
||||||
|
|
Loading…
Reference in New Issue