feat: use blurHash when loading list backgrounds
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
356e01cd14
commit
b5f693e230
|
@ -44,6 +44,7 @@ export default class ListModel extends AbstractModel {
|
||||||
isFavorite: false,
|
isFavorite: false,
|
||||||
subscription: null,
|
subscription: null,
|
||||||
position: 0,
|
position: 0,
|
||||||
|
backgroundBlurHash: '',
|
||||||
|
|
||||||
created: null,
|
created: null,
|
||||||
updated: null,
|
updated: null,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {createStore} from 'vuex'
|
import {createStore} from 'vuex'
|
||||||
|
import {getBlobFromBlurHash} from '../helpers/getBlobFromBlurHash'
|
||||||
import {
|
import {
|
||||||
BACKGROUND,
|
BACKGROUND,
|
||||||
CURRENT_LIST,
|
CURRENT_LIST,
|
||||||
|
@ -128,6 +129,11 @@ export const store = createStore({
|
||||||
) {
|
) {
|
||||||
if (currentList.backgroundInformation) {
|
if (currentList.backgroundInformation) {
|
||||||
try {
|
try {
|
||||||
|
const blurHash = await getBlobFromBlurHash(currentList.backgroundBlurHash)
|
||||||
|
if(blurHash) {
|
||||||
|
commit(BACKGROUND, window.URL.createObjectURL(blurHash))
|
||||||
|
}
|
||||||
|
|
||||||
const listService = new ListService()
|
const listService = new ListService()
|
||||||
const background = await listService.background(currentList)
|
const background = await listService.background(currentList)
|
||||||
commit(BACKGROUND, background)
|
commit(BACKGROUND, background)
|
||||||
|
|
Reference in New Issue
Block a user