Merge branches 'develop' and 't3chguy/s1' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/s1

This commit is contained in:
Michael Telatynski 2020-02-04 15:48:04 +00:00
commit d585dbab02
151 changed files with 3116 additions and 4993 deletions

View file

@ -144,7 +144,7 @@ export const SETTINGS = {
},
"feature_cross_signing": {
isFeature: true,
displayName: _td("Enable cross-signing to verify per-user instead of per-device (in development)"),
displayName: _td("Enable cross-signing to verify per-user instead of per-session (in development)"),
supportedLevels: LEVELS_FEATURE,
default: false,
},
@ -160,6 +160,12 @@ export const SETTINGS = {
displayName: _td("Show info about bridges in room settings"),
default: false,
},
"feature_invite_only_padlocks": {
isFeature: true,
supportedLevels: LEVELS_FEATURE,
displayName: _td("Show padlocks on invite only rooms"),
default: true,
},
"MessageComposerInput.suggestEmoji": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Enable Emoji suggestions while typing'),
@ -348,8 +354,8 @@ export const SETTINGS = {
supportedLevels: ['room-device', 'device'],
supportedLevelsAreOrdered: true,
displayName: {
"default": _td('Never send encrypted messages to unverified devices from this device'),
"room-device": _td('Never send encrypted messages to unverified devices in this room from this device'),
"default": _td('Never send encrypted messages to unverified sessions from this session'),
"room-device": _td('Never send encrypted messages to unverified sessions in this room from this session'),
},
default: false,
},
@ -485,4 +491,14 @@ export const SETTINGS = {
displayName: _td("Enable message search in encrypted rooms"),
default: true,
},
"keepSecretStoragePassphraseForSession": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("Keep secret storage passphrase in memory for this session"),
default: false,
},
"crawlerSleepTime": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("How fast should messages be downloaded."),
default: 3000,
},
};

View file

@ -113,6 +113,9 @@ export default class SettingsStore {
static _watchers = {}; // { callbackRef => { callbackFn } }
static _monitors = {}; // { settingName => { roomId => callbackRef } }
// Counter used for generation of watcher IDs
static _watcherCount = 1;
/**
* Watches for changes in a particular setting. This is done without any local echo
* wrapping and fires whenever a change is detected in a setting's value, at any level.
@ -138,7 +141,7 @@ export default class SettingsStore {
settingName = setting.invertedSettingName;
}
const watcherId = `${new Date().getTime()}_${settingName}_${roomId}`;
const watcherId = `${new Date().getTime()}_${SettingsStore._watcherCount++}_${settingName}_${roomId}`;
const localizedCallback = (changedInRoomId, atLevel, newValAtLevel) => {
const newValue = SettingsStore.getValue(originalSettingName);

View file

@ -19,9 +19,13 @@ import SettingController from "./SettingController";
import {DEFAULT_THEME, enumerateThemes} from "../../theme";
export default class ThemeController extends SettingController {
static isLogin = false;
getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) {
if (!calculatedValue) return null; // Don't override null themes
if (ThemeController.isLogin) return 'light';
const themes = enumerateThemes();
// Override in case some no longer supported theme is stored here
if (!themes[calculatedValue]) {