You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Add option to hide other people's read receipts.
Addresses vector-im/riot-web#2526 Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -44,6 +44,10 @@ const SETTINGS_LABELS = [
|
|||||||
id: 'autoplayGifsAndVideos',
|
id: 'autoplayGifsAndVideos',
|
||||||
label: 'Autoplay GIFs and videos',
|
label: 'Autoplay GIFs and videos',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'hideReadReceipts',
|
||||||
|
label: 'Hide read receipts'
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
id: 'alwaysShowTimestamps',
|
id: 'alwaysShowTimestamps',
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ var Modal = require('../../../Modal');
|
|||||||
var sdk = require('../../../index');
|
var sdk = require('../../../index');
|
||||||
var TextForEvent = require('../../../TextForEvent');
|
var TextForEvent = require('../../../TextForEvent');
|
||||||
import WithMatrixClient from '../../../wrappers/WithMatrixClient';
|
import WithMatrixClient from '../../../wrappers/WithMatrixClient';
|
||||||
|
import * as UserSettingsStore from "../../../UserSettingsStore";
|
||||||
|
|
||||||
var ContextualMenu = require('../../structures/ContextualMenu');
|
var ContextualMenu = require('../../structures/ContextualMenu');
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
@@ -284,6 +285,11 @@ module.exports = WithMatrixClient(React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getReadAvatars: function() {
|
getReadAvatars: function() {
|
||||||
|
// return early if the user doesn't want any read receipts
|
||||||
|
if (UserSettingsStore.getSyncedSetting('hideReadReceipts', false)) {
|
||||||
|
return (<span className="mx_EventTile_readAvatars"></span>);
|
||||||
|
}
|
||||||
|
|
||||||
const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
|
const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
|
||||||
const avatars = [];
|
const avatars = [];
|
||||||
const receiptOffset = 15;
|
const receiptOffset = 15;
|
||||||
|
|||||||
Reference in New Issue
Block a user