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