[ICU-536] Fix link previews preference (#1364)
* Fix link previews preference * Fixed grammar in a comment
This commit is contained in:
parent
9029794afa
commit
7bd55e96dc
2 changed files with 6 additions and 1 deletions
|
|
@ -36,9 +36,13 @@ function makeMapStateToProps() {
|
|||
|
||||
return function mapStateToProps(state, ownProps) {
|
||||
const config = getConfig(state);
|
||||
const previewsEnabled = getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, `${ViewTypes.FEATURE_TOGGLE_PREFIX}${ViewTypes.EMBED_PREVIEW}`);
|
||||
const link = getFirstLink(ownProps.message);
|
||||
|
||||
// Link previews used to be an advanced settings until server version 4.4 when it was changed to be a display setting.
|
||||
// We are checking both here until we bump the server requirement for the mobile apps.
|
||||
const previewsEnabled = getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, `${ViewTypes.FEATURE_TOGGLE_PREFIX}${ViewTypes.EMBED_PREVIEW}`) ||
|
||||
getBool(state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.LINK_PREVIEW_DISPLAY, true);
|
||||
|
||||
return {
|
||||
...getDimensions(state),
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export default {
|
|||
POST_VISIBILITY_CHUNK_SIZE: 15,
|
||||
FEATURE_TOGGLE_PREFIX: 'feature_enabled_',
|
||||
EMBED_PREVIEW: 'embed_preview',
|
||||
LINK_PREVIEW_DISPLAY: 'link_previews',
|
||||
MIN_CHANNELNAME_LENGTH: 2,
|
||||
MAX_CHANNELNAME_LENGTH: 22,
|
||||
ANDROID_TOP_LANDSCAPE: 46,
|
||||
|
|
|
|||
Loading…
Reference in a new issue