lint
This commit is contained in:
parent
5ea3d462b9
commit
95bbe73832
19 changed files with 38 additions and 58 deletions
|
|
@ -12,9 +12,7 @@ export const maybeShowChatNotification = (chat) => {
|
|||
body: chat.lastMessage.content,
|
||||
}
|
||||
|
||||
if (
|
||||
chat.lastMessage.attachment?.type === 'image'
|
||||
) {
|
||||
if (chat.lastMessage.attachment?.type === 'image') {
|
||||
opts.image = chat.lastMessage.attachment.preview_url
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,10 +175,7 @@ export const prepareNotificationObject = (notification, i18n) => {
|
|||
}
|
||||
|
||||
// Shows first attached non-nsfw image, if any. Should add configuration for this somehow...
|
||||
if (
|
||||
!status.nsfw &&
|
||||
status?.attachments?.[0]?.mimetype.startsWith('image/')
|
||||
) {
|
||||
if (!status.nsfw && status?.attachments?.[0]?.mimetype.startsWith('image/')) {
|
||||
notifObj.image = status.attachments[0].url
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
/* global process */
|
||||
function urlBase64ToUint8Array(base64String) {
|
||||
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
|
||||
const base64 = (base64String + padding).replaceAll('-', '+').replace(/_/g, '/')
|
||||
const base64 = (base64String + padding)
|
||||
.replaceAll('-', '+')
|
||||
.replace(/_/g, '/')
|
||||
|
||||
const rawData = window.atob(base64)
|
||||
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
||||
|
|
|
|||
|
|
@ -244,10 +244,7 @@ export const OPACITIES = Object.entries(SLOT_INHERITANCE).reduce((acc, [k]) => {
|
|||
...acc,
|
||||
[opacity]: {
|
||||
defaultValue: DEFAULT_OPACITY[opacity] || 1,
|
||||
affectedSlots: [
|
||||
...((acc[opacity]?.affectedSlots) || []),
|
||||
k,
|
||||
],
|
||||
affectedSlots: [...(acc[opacity]?.affectedSlots || []), k],
|
||||
},
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue