Skip loading gravatars if user has third party icons deselected

This commit is contained in:
Bryan Housel
2019-12-20 14:16:54 -05:00
parent 11dfe7e571
commit 96250be04a
2 changed files with 4 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import { services } from '../services';
import { utilDetect } from '../util/detect';
export function uiNoteComments() {
export function uiNoteComments(context) {
var _note;
@@ -76,8 +76,9 @@ export function uiNoteComments() {
function replaceAvatars(selection) {
var showThirdPartyIcons = context.storage('preferences.privacy.thirdpartyicons') || 'true';
var osm = services.osm;
if (!osm) return;
if (showThirdPartyIcons !== 'true' || !osm) return;
var uids = {}; // gather uids in the comment thread
_note.comments.forEach(function(d) {

View File

@@ -28,7 +28,7 @@ import {
export function uiNoteEditor(context) {
var dispatch = d3_dispatch('change');
var quickLinks = uiQuickLinks();
var noteComments = uiNoteComments();
var noteComments = uiNoteComments(context);
var noteHeader = uiNoteHeader();
// var formFields = uiFormFields(context);