Skip to content

Commit e0543e3

Browse files
Merge pull request #2055 from Gauravjeetsingh/qa-fixes
Bug fixes and improvements
2 parents 5a5c3f5 + 1ce2c11 commit e0543e3

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

www/main/navigator/shabad/FavShabadIcon.jsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,22 @@ const FavShabadIcon = ({ paneId }) => {
6666
}, [favShabad, currentShabad]);
6767

6868
const toggleFavShabad = () => {
69+
setLoading(true);
6970
if (favShabadIndex < 0) {
70-
addToFav(currentShabad, currentVerse, userToken);
71+
addToFav(currentShabad, currentVerse, userToken)
72+
.then(() => fetchFavShabad(userToken))
73+
.then((data) => {
74+
setFavShabad([...data]);
75+
setLoading(false);
76+
});
7177
} else {
72-
favShabad.splice(favShabadIndex, 1);
73-
removeFromFav(currentShabad, userToken);
74-
setFavShabad([...favShabad]);
78+
removeFromFav(currentShabad, userToken)
79+
.then(() => fetchFavShabad(userToken))
80+
.then((data) => {
81+
setFavShabad([...data]);
82+
setLoading(false);
83+
});
7584
}
76-
const fetchProgress = fetchFavShabad(userToken);
77-
setLoading(true);
78-
fetchProgress.then((data) => {
79-
setFavShabad([...data]);
80-
setLoading(false);
81-
});
8285
};
8386

8487
if (

www/obs/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@
211211
spanEl.style.backgroundColor = 'transparent';
212212
});
213213
document.querySelector('.overlay-wrapper').style.backgroundColor = 'transparent';
214-
// Apply the background color from theme
215-
el.style.backgroundColor = `rgba(${hexToRgb(overlayPrefs.bgColor)}, ${bgOpacity})`;
216214
});
217215

218216
// Special style overrides for vertical layout

0 commit comments

Comments
 (0)