MOBILE-4437 icon: Check branded icons checking filtericon url param

main
Pau Ferrer Ocaña 2024-04-11 11:41:31 +02:00
parent fb1600aa66
commit 7f0ceb5c7a
1 changed files with 4 additions and 3 deletions

View File

@ -92,7 +92,6 @@ export class CoreModIconComponent implements OnInit, OnChanges {
this.modNameTranslated = CoreCourse.translateModuleName(this.modname, this.fallbackTranslation);
this.setIsBranded();
this.setPurposeClass();
await this.setIcon();
@ -113,7 +112,7 @@ export class CoreModIconComponent implements OnInit, OnChanges {
* @returns wether the icon does not need to be filtered.
*/
protected async setIsBranded(): Promise<void> {
if (!this.colorize || this.isBranded !== undefined) {
if (!this.colorize) {
// It doesn't matter.
return;
}
@ -127,7 +126,6 @@ export class CoreModIconComponent implements OnInit, OnChanges {
// No icon or local icon (not legacy), colorize it.
if (!this.iconUrl || this.isLocalUrl) {
// Exception for bigbluebuttonbn, it's the only one that has a branded icon.
if (this.iconVersion === IconVersion.VERSION_4_0 && this.modname === 'bigbluebuttonbn') {
this.isBranded = true;
@ -174,6 +172,7 @@ export class CoreModIconComponent implements OnInit, OnChanges {
if (!this.iconUrl) {
this.loadFallbackIcon();
this.setIsBranded();
return;
}
@ -189,6 +188,8 @@ export class CoreModIconComponent implements OnInit, OnChanges {
!this.isLocalUrl &&
this.getComponentNameFromIconUrl(this.iconUrl) != this.modname;
this.setIsBranded();
await this.setSVGIcon();
}