I think this would be simpler without the nested function.

var flashMode = this.settings.flashModesPicture.selected('key');
var deactivated = setting.key === 'hdr' && key === 'on' && flashMode !== 'off';
setting.select(key);
self.closeSettings();
self.notify(setting, deactivated);