Minor bug fixes

This commit is contained in:
sairaj mote 2022-02-21 23:22:09 +05:30
parent 8b2d20e32d
commit 368a520fe5
4 changed files with 14 additions and 6 deletions

View File

@ -817,7 +817,6 @@ theme-toggle {
}
#article_map_container {
margin-top: 1.5rem;
display: grid;
gap: 0.5rem;
}
@ -1170,6 +1169,10 @@ theme-toggle {
padding: 0 1.5rem;
}
#article_map_container {
padding: 1rem 0;
}
.writer-card .writer-profile {
height: 2.5rem;
width: 2.5rem;
@ -1291,6 +1294,7 @@ theme-toggle {
}
#article_map_container {
margin-top: 1.5rem;
margin-bottom: 3rem;
}

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -772,7 +772,6 @@ theme-toggle {
z-index: 5;
}
#article_map_container {
margin-top: 1.5rem;
display: grid;
gap: 0.5rem;
button {
@ -1108,6 +1107,9 @@ theme-toggle {
padding: 0 1.5rem;
}
}
#article_map_container {
padding: 1rem 0;
}
.writer-card {
.writer-profile {
height: 2.5rem;
@ -1215,6 +1217,7 @@ theme-toggle {
overflow-y: overlay;
}
#article_map_container {
margin-top: 1.5rem;
margin-bottom: 3rem;
}
.heading-shortcut {

View File

@ -1128,7 +1128,7 @@
// checks if an article image is already fetched and if not, fetches it and returns the image
const getImage = (articleID) => new Promise((resolve, reject) => {
const { heroImage: heroImageVC } = floGlobals.appObjects.rmTimes.articles[articleID]
if (mappedImages.hasOwnProperty(articleID)) {
if (mappedImages.hasOwnProperty(articleID) && mappedImages[articleID] === heroImageVC) {
compactIDB.readData('images', articleID).then(image => {
if (image) {
resolve(image.heroImage)
@ -1140,8 +1140,9 @@
}).then(result => {
compactIDB.writeData('images', {
heroImage: result[heroImageVC].message,
heroImageVC
}, articleID)
mappedImages[articleID] = true
mappedImages[articleID] = heroImageVC
resolve(result[heroImageVC].message)
})
}
@ -1412,7 +1413,7 @@
const getArticles = async () => {
compactIDB.readAllData('images').then(allImages => {
for (const imageID in allImages) {
mappedImages[imageID] = true
mappedImages[imageID] = allImages[imageID].heroImageVC
}
})
Promise.all([