Add option to not send typing notifications
Addresses vector-im/riot-web#3220 Fix applies to both the RTE and plain editor. Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
ae8d04b35d
commit
64e416e117
3 changed files with 7 additions and 0 deletions
|
@ -44,6 +44,10 @@ const SETTINGS_LABELS = [
|
||||||
id: 'autoplayGifsAndVideos',
|
id: 'autoplayGifsAndVideos',
|
||||||
label: 'Autoplay GIFs and videos',
|
label: 'Autoplay GIFs and videos',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'dontSendTypingNotifications',
|
||||||
|
label: "Don't send typing notifications",
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
id: 'alwaysShowTimestamps',
|
id: 'alwaysShowTimestamps',
|
||||||
|
|
|
@ -355,6 +355,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
sendTyping(isTyping) {
|
sendTyping(isTyping) {
|
||||||
|
if (UserSettingsStore.getSyncedSetting('dontSendTypingNotifications', false)) return;
|
||||||
MatrixClientPeg.get().sendTyping(
|
MatrixClientPeg.get().sendTyping(
|
||||||
this.props.room.roomId,
|
this.props.room.roomId,
|
||||||
this.isTyping, TYPING_SERVER_TIMEOUT
|
this.isTyping, TYPING_SERVER_TIMEOUT
|
||||||
|
|
|
@ -20,6 +20,7 @@ var SlashCommands = require("../../../SlashCommands");
|
||||||
var Modal = require("../../../Modal");
|
var Modal = require("../../../Modal");
|
||||||
var MemberEntry = require("../../../TabCompleteEntries").MemberEntry;
|
var MemberEntry = require("../../../TabCompleteEntries").MemberEntry;
|
||||||
var sdk = require('../../../index');
|
var sdk = require('../../../index');
|
||||||
|
import UserSettingsStore from "../../../UserSettingsStore";
|
||||||
|
|
||||||
var dis = require("../../../dispatcher");
|
var dis = require("../../../dispatcher");
|
||||||
var KeyCode = require("../../../KeyCode");
|
var KeyCode = require("../../../KeyCode");
|
||||||
|
@ -420,6 +421,7 @@ export default React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
sendTyping: function(isTyping) {
|
sendTyping: function(isTyping) {
|
||||||
|
if (UserSettingsStore.getSyncedSetting('dontSendTypingNotifications', false)) return;
|
||||||
MatrixClientPeg.get().sendTyping(
|
MatrixClientPeg.get().sendTyping(
|
||||||
this.props.room.roomId,
|
this.props.room.roomId,
|
||||||
this.isTyping, TYPING_SERVER_TIMEOUT
|
this.isTyping, TYPING_SERVER_TIMEOUT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue