Fix emoji error in profile title when hidden

This commit is contained in:
idotj 2024-02-08 16:10:44 +01:00
parent c118544555
commit e12f7b6c05
3 changed files with 39 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -52,7 +52,7 @@ class MastodonTimeline {
* Initialize and build the timeline
*/
mtInit() {
console.log("Init Mastodon timeline. Settings: ", this.mtSettings);
// console.log("Init Mastodon timeline. Settings: ", this.mtSettings);
this.#loadColorTheme();
this.#buildTimeline("newTimeline");
}
@ -186,7 +186,7 @@ class MastodonTimeline {
return { ...result, ...dataItem };
}, {});
console.log("Timeline data fetched: ", this.mtSettings.fetchedData);
// console.log("Timeline data fetched: ", this.mtSettings.fetchedData);
resolve();
});
});
@ -311,12 +311,15 @@ class MastodonTimeline {
"</a>";
// User name and url
userName = this.#createEmoji(
c.reblog.account.display_name
? c.reblog.account.display_name
: c.reblog.account.username,
this.mtSettings.fetchedData.emojos
);
userName = c.reblog.account.display_name
? c.reblog.account.display_name
: c.reblog.account.username;
if (!this.mtSettings.hideEmojos) {
userName = this.#createEmoji(
userName,
this.mtSettings.fetchedData.emojos
);
}
user =
'<div class="mt-post-header-user">' +
'<a href="' +
@ -356,10 +359,15 @@ class MastodonTimeline {
"</a>";
// User name and url
userName = this.#createEmoji(
c.account.display_name ? c.account.display_name : c.account.username,
this.mtSettings.fetchedData.emojos
);
userName = c.account.display_name
? c.account.display_name
: c.account.username;
if (!this.mtSettings.hideEmojos) {
userName = this.#createEmoji(
userName,
this.mtSettings.fetchedData.emojos
);
}
user =
'<div class="mt-post-header-user">' +
'<a href="' +

View File

@ -311,12 +311,15 @@ class MastodonTimeline {
"</a>";
// User name and url
userName = this.#createEmoji(
c.reblog.account.display_name
? c.reblog.account.display_name
: c.reblog.account.username,
this.mtSettings.fetchedData.emojos
);
userName = c.reblog.account.display_name
? c.reblog.account.display_name
: c.reblog.account.username;
if (!this.mtSettings.hideEmojos) {
userName = this.#createEmoji(
userName,
this.mtSettings.fetchedData.emojos
);
}
user =
'<div class="mt-post-header-user">' +
'<a href="' +
@ -356,10 +359,15 @@ class MastodonTimeline {
"</a>";
// User name and url
userName = this.#createEmoji(
c.account.display_name ? c.account.display_name : c.account.username,
this.mtSettings.fetchedData.emojos
);
userName = c.account.display_name
? c.account.display_name
: c.account.username;
if (!this.mtSettings.hideEmojos) {
userName = this.#createEmoji(
userName,
this.mtSettings.fetchedData.emojos
);
}
user =
'<div class="mt-post-header-user">' +
'<a href="' +