Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7a3914f

Browse files
committed
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/19530
2 parents 41062c6 + e0927f3 commit 7a3914f

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

res/css/_common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $slider-selection-dot-size: 2.4em;
3232

3333
$container-border-width: 8px;
3434

35-
$timeline-image-boarder-radius: 8px;
35+
$timeline-image-border-radius: 8px;
3636
:root {
3737
font-size: 10px;
3838

res/css/views/messages/_MImageBody.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
*/
1717

18-
$timeline-image-boarder-radius: 8px;
18+
$timeline-image-border-radius: 8px;
1919

2020
.mx_MImageBody_thumbnail--blurhash {
2121
position: absolute;
@@ -25,7 +25,7 @@ $timeline-image-boarder-radius: 8px;
2525

2626
.mx_MImageBody_thumbnail {
2727
object-fit: contain;
28-
border-radius: $timeline-image-boarder-radius;
28+
border-radius: $timeline-image-border-radius;
2929

3030
display: flex;
3131
justify-content: center;

res/css/views/messages/_MVideoBody.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ span.mx_MVideoBody {
1818
video.mx_MVideoBody {
1919
max-width: 100%;
2020
height: auto;
21-
border-radius: $timeline-image-boarder-radius;
21+
border-radius: $timeline-image-border-radius;
2222
}
2323
}

src/RoomNotifs.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
import { MatrixClientPeg } from './MatrixClientPeg';
1919
import { PushProcessor } from 'matrix-js-sdk/src/pushprocessor';
2020
import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
21-
import { IAnnotatedPushRule, PushRuleKind } from "matrix-js-sdk/src/@types/PushRules";
21+
import { ConditionKind, IPushRule, PushRuleActionName, PushRuleKind } from "matrix-js-sdk/src/@types/PushRules";
2222

2323
export enum RoomNotifState {
2424
AllMessagesLoud = 'all_messages_loud',
@@ -205,14 +205,12 @@ function setRoomNotifsStateUnmuted(roomId: string, newState: RoomNotifState): Pr
205205
return Promise.all(promises);
206206
}
207207

208-
function findOverrideMuteRule(roomId: string): IAnnotatedPushRule {
208+
function findOverrideMuteRule(roomId: string): IPushRule {
209209
const cli = MatrixClientPeg.get();
210-
if (!cli.pushRules ||
211-
!cli.pushRules['global'] ||
212-
!cli.pushRules['global'].override) {
210+
if (!cli?.pushRules?.global?.override) {
213211
return null;
214212
}
215-
for (const rule of cli.pushRules['global'].override) {
213+
for (const rule of cli.pushRules.global.override) {
216214
if (isRuleForRoom(roomId, rule)) {
217215
if (isMuteRule(rule) && rule.enabled) {
218216
return rule;
@@ -222,14 +220,14 @@ function findOverrideMuteRule(roomId: string): IAnnotatedPushRule {
222220
return null;
223221
}
224222

225-
function isRuleForRoom(roomId: string, rule: IAnnotatedPushRule): boolean {
223+
function isRuleForRoom(roomId: string, rule: IPushRule): boolean {
226224
if (rule.conditions.length !== 1) {
227225
return false;
228226
}
229227
const cond = rule.conditions[0];
230-
return (cond.kind === 'event_match' && cond.key === 'room_id' && cond.pattern === roomId);
228+
return (cond.kind === ConditionKind.EventMatch && cond.key === 'room_id' && cond.pattern === roomId);
231229
}
232230

233-
function isMuteRule(rule: IAnnotatedPushRule): boolean {
234-
return (rule.actions.length === 1 && rule.actions[0] === 'dont_notify');
231+
function isMuteRule(rule: IPushRule): boolean {
232+
return (rule.actions.length === 1 && rule.actions[0] === PushRuleActionName.DontNotify);
235233
}

src/components/views/dialogs/IncomingSasDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const PHASE_VERIFIED = 3;
3939
const PHASE_CANCELLED = 4;
4040

4141
interface IProps extends IDialogProps {
42-
verifier: VerificationBase; // TODO types
42+
verifier: VerificationBase;
4343
}
4444

4545
interface IState {

src/settings/enums/ImageSize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
const SIZE_LARGE = { w: 480, h: 360 };
17+
const SIZE_LARGE = { w: 800, h: 600 };
1818
const SIZE_NORMAL = { w: 324, h: 220 };
1919

2020
export enum ImageSize {

0 commit comments

Comments
 (0)