1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

fix(ui): invert toast notification icons

This commit is contained in:
Frédéric Guillot 2025-08-09 14:23:20 -07:00
parent e0ca92fca4
commit b20a8c97b0

View file

@ -635,7 +635,7 @@ function toggleEntryStatus(element, toasting) {
setReadStatusButtonState(buttonElement, newStatus);
if (toasting) {
showToastNotification(currentStatus, currentStatus === "read" ? buttonElement.dataset.toastUnread : buttonElement.dataset.toastRead);
showToastNotification(newStatus, currentStatus === "read" ? buttonElement.dataset.toastUnread : buttonElement.dataset.toastRead);
}
if (element.classList.contains("item-status-" + currentStatus)) {
@ -716,13 +716,14 @@ function handleBookmarkAction(element) {
setButtonToLoadingState(buttonElement);
sendPOSTRequest(buttonElement.dataset.bookmarkUrl).then(() => {
const isStarred = buttonElement.dataset.value === "star";
const currentState = buttonElement.dataset.value;
const isStarred = currentState === "star";
const newStarStatus = isStarred ? "unstar" : "star";
setBookmarkButtonState(buttonElement, newStarStatus);
if (isEntryView()) {
showToastNotification(newStarStatus, buttonElement.dataset[isStarred ? "toastUnstar" : "toastStar"]);
showToastNotification(currentState, buttonElement.dataset[isStarred ? "toastUnstar" : "toastStar"]);
}
});
}