You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
port over low_bandwidth mode to develop
This commit is contained in:
@@ -584,6 +584,8 @@ var TimelinePanel = React.createClass({
|
||||
},
|
||||
|
||||
sendReadReceipt: function() {
|
||||
if (SettingsStore.getValue("lowBandwidth")) return;
|
||||
|
||||
if (!this.refs.messagePanel) return;
|
||||
if (!this.props.manageReadReceipts) return;
|
||||
// This happens on user_activity_end which is delayed, and it's
|
||||
|
||||
@@ -84,6 +84,13 @@ const SIMPLE_SETTINGS = [
|
||||
{ id: "enableWidgetScreenshots" },
|
||||
{ id: "pinMentionedRooms" },
|
||||
{ id: "pinUnreadRooms" },
|
||||
{
|
||||
id: "lowBandwidth",
|
||||
fn: () => {
|
||||
PlatformPeg.get().reload();
|
||||
},
|
||||
level: SettingLevel.DEVICE,
|
||||
},
|
||||
{ id: "showDeveloperTools" },
|
||||
{ id: "promptBeforeInviteUnknownUsers" },
|
||||
];
|
||||
@@ -644,7 +651,7 @@ module.exports = React.createClass({
|
||||
<div className="mx_UserSettings_toggle" key={setting.id}>
|
||||
<SettingsFlag name={setting.id}
|
||||
label={setting.label}
|
||||
level={SettingLevel.ACCOUNT}
|
||||
level={setting.level ? setting.level : SettingLevel.ACCOUNT}
|
||||
onChange={setting.fn} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -20,6 +20,7 @@ import PropTypes from 'prop-types';
|
||||
import { MatrixClient } from 'matrix-js-sdk';
|
||||
import AvatarLogic from '../../../Avatar';
|
||||
import sdk from '../../../index';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import AccessibleButton from '../elements/AccessibleButton';
|
||||
|
||||
module.exports = React.createClass({
|
||||
@@ -104,9 +105,13 @@ module.exports = React.createClass({
|
||||
// work out the full set of urls to try to load. This is formed like so:
|
||||
// imageUrls: [ props.url, props.urls, default image ]
|
||||
|
||||
const urls = props.urls || [];
|
||||
if (props.url) {
|
||||
urls.unshift(props.url); // put in urls[0]
|
||||
let urls = [];
|
||||
if (!SettingsStore.getValue("lowBandwidth")) {
|
||||
urls = props.urls || [];
|
||||
|
||||
if (props.url) {
|
||||
urls.unshift(props.url); // put in urls[0]
|
||||
}
|
||||
}
|
||||
|
||||
let defaultImageUrl = null;
|
||||
|
||||
@@ -487,6 +487,7 @@ export default class MessageComposerInput extends React.Component {
|
||||
|
||||
sendTyping(isTyping) {
|
||||
if (!SettingsStore.getValue('sendTypingNotifications')) return;
|
||||
if (SettingsStore.getValue('lowBandwidth')) return;
|
||||
MatrixClientPeg.get().sendTyping(
|
||||
this.props.room.roomId,
|
||||
this.isTyping, TYPING_SERVER_TIMEOUT,
|
||||
|
||||
Reference in New Issue
Block a user