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:
parent
e0ca92fca4
commit
b20a8c97b0
1 changed files with 4 additions and 3 deletions
|
@ -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"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue