Skip to content

Commit

Permalink
[FIX] Auto load image user preference (#15895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored and sampaiodiego committed Dec 9, 2019
1 parent 04ec7db commit 0e0c486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/ui-utils/client/lib/messageContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { settings } from '../../../settings/client';
import { getUserPreference } from '../../../utils/client';
import { AutoTranslate } from '../../../autotranslate/client';

const fields = { name: 1, username: 1, 'settings.autoImageLoad': 1, 'settings.saveMobileBandwidth': 1, 'settings.collapseMediaByDefault': 1, 'settings.hideRoles': 1 };
const fields = { name: 1, username: 1, 'settings.preferences.autoImageLoad': 1, 'settings.preferences.saveMobileBandwidth': 1, 'settings.preferences.collapseMediaByDefault': 1, 'settings.preferences.hideRoles': 1 };

export function messageContext({ rid } = Template.instance()) {
const uid = Meteor.userId();
Expand All @@ -30,7 +30,7 @@ export function messageContext({ rid } = Template.instance()) {
}),
settings: {
translateLanguage: AutoTranslate.getLanguage(rid),
autoImageLoad: getUserPreference(user, 'saveMobileBandwidth'),
autoImageLoad: getUserPreference(user, 'autoImageLoad'),
saveMobileBandwidth: Meteor.Device.isPhone() && getUserPreference(user, 'saveMobileBandwidth'),
collapseMediaByDefault: getUserPreference(user, 'collapseMediaByDefault'),
showreply: true,
Expand Down

0 comments on commit 0e0c486

Please sign in to comment.