Match the user settings for icon prefill on card for template (#870)

This commit is contained in:
Jesús Espino 2021-08-02 20:18:31 +02:00 committed by GitHub
parent be28b7dad5
commit b2206f0b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ import octoClient, {OctoClient} from './octoClient'
import {OctoUtils} from './octoUtils'
import undoManager from './undomanager'
import {Utils} from './utils'
import {UserSettings} from './userSettings'
//
// The Mutator is used to make all changes to server state
@ -524,7 +525,7 @@ class Mutator {
newCard.title = ''
// If the template doesn't specify an icon, initialize it to a random one
if (!newCard.fields.icon) {
if (!newCard.fields.icon && UserSettings.prefillRandomIcons) {
newCard.fields.icon = BlockIcons.shared.randomIcon()
}
}