From cb6c080828ba8b1034e2989243bebf3d5445f5ca Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 30 Nov 2020 16:44:31 +0000 Subject: [PATCH 1/3] Fix remote video being too tall and causing aux panel to scroll --- res/css/views/voip/_CallView.scss | 3 ++- src/components/views/voip/CallView.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index d5e58c94c5..6cc420236f 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -25,7 +25,8 @@ limitations under the License. } .mx_CallView_large { - padding-bottom: 10px; + // XXX: This should be 10 but somehow it's gaining an extra 4px from somewhere... + padding-bottom: 6px; .mx_CallView_voice { height: 360px; diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index c9f5db77e6..34952f521b 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -94,6 +94,10 @@ const CONTROLS_HIDE_DELAY = 1000; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video const HEADER_HEIGHT = 44; + +// Also duplicated from the CSS: the bottom padding on the call view +const CALL_PADDING_BOTTOM = 10; + const CONTEXT_MENU_VPADDING = 8; // How far the context menu sits above the button (px) export default class CallView extends React.Component { @@ -478,7 +482,9 @@ export default class CallView extends React.Component { } // if we're fullscreen, we don't want to set a maxHeight on the video element. - const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; + const maxVideoHeight = getFullScreenElement() ? null : ( + this.props.maxVideoHeight - HEADER_HEIGHT - CALL_PADDING_BOTTOM + ); contentView =
{onHoldBackground} Date: Wed, 9 Dec 2020 18:36:48 -0700 Subject: [PATCH 2/3] Remove impossible labs feature: sending hidden read receipts This claims it requires a compatible homeserver, but that does not exist and hasn't for years. Let's just remove the option to stop giving people false hope. Once notifications are decoupled from read receipts, this sort of thing should be more possible. --- src/components/structures/TimelinePanel.js | 4 +--- .../views/settings/tabs/user/LabsUserSettingsTab.js | 1 - src/i18n/strings/en_EN.json | 1 - src/settings/Settings.ts | 7 ------- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 8bbc66bf40..cc5c2a9844 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -716,19 +716,17 @@ class TimelinePanel extends React.Component { this.lastRMSentEventId = this.state.readMarkerEventId; const roomId = this.props.timelineSet.room.roomId; - const hiddenRR = !SettingsStore.getValue("sendReadReceipts", roomId); debuglog('TimelinePanel: Sending Read Markers for ', this.props.timelineSet.room.roomId, 'rm', this.state.readMarkerEventId, lastReadEvent ? 'rr ' + lastReadEvent.getId() : '', - ' hidden:' + hiddenRR, ); MatrixClientPeg.get().setRoomReadMarkers( this.props.timelineSet.room.roomId, this.state.readMarkerEventId, lastReadEvent, // Could be null, in which case no RR is sent - {hidden: hiddenRR}, + {}, ).catch((e) => { // /read_markers API is not implemented on this HS, fallback to just RR if (e.errcode === 'M_UNRECOGNIZED' && lastReadEvent) { diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js index eba5c6586d..91bc9abcad 100644 --- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js @@ -67,7 +67,6 @@ export default class LabsUserSettingsTab extends React.Component { -
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 1b5d4b6ec4..f5484202e8 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -820,7 +820,6 @@ "Show hidden events in timeline": "Show hidden events in timeline", "Low bandwidth mode": "Low bandwidth mode", "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)": "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)", - "Send read receipts for messages (requires compatible homeserver to disable)": "Send read receipts for messages (requires compatible homeserver to disable)", "Show previews/thumbnails for images": "Show previews/thumbnails for images", "Enable message search in encrypted rooms": "Enable message search in encrypted rooms", "How fast should messages be downloaded.": "How fast should messages be downloaded.", diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 6bec31a1cb..b239b809fe 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -564,13 +564,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { // This is a tri-state value, where `null` means "prompt the user". default: null, }, - "sendReadReceipts": { - supportedLevels: LEVELS_ROOM_SETTINGS, - displayName: _td( - "Send read receipts for messages (requires compatible homeserver to disable)", - ), - default: true, - }, "showImages": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: _td("Show previews/thumbnails for images"), From 80d6629c3ea2ef11eb303932a822ac6c2926f3b7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 9 Dec 2020 18:50:16 -0700 Subject: [PATCH 3/3] delete the rest too --- src/components/structures/TimelinePanel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index cc5c2a9844..27a384ddb2 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -715,8 +715,6 @@ class TimelinePanel extends React.Component { } this.lastRMSentEventId = this.state.readMarkerEventId; - const roomId = this.props.timelineSet.room.roomId; - debuglog('TimelinePanel: Sending Read Markers for ', this.props.timelineSet.room.roomId, 'rm', this.state.readMarkerEventId, @@ -732,7 +730,7 @@ class TimelinePanel extends React.Component { if (e.errcode === 'M_UNRECOGNIZED' && lastReadEvent) { return MatrixClientPeg.get().sendReadReceipt( lastReadEvent, - {hidden: hiddenRR}, + {}, ).catch((e) => { console.error(e); this.lastRRSentEventId = undefined;