File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -648,10 +648,7 @@ function toggleEntryStatus(element, toasting) {
648648 showToastNotification ( newStatus , currentStatus === "read" ? buttonElement . dataset . toastUnread : buttonElement . dataset . toastRead ) ;
649649 }
650650
651- if ( element . classList . contains ( "item-status-" + currentStatus ) ) {
652- element . classList . remove ( "item-status-" + currentStatus ) ;
653- element . classList . add ( "item-status-" + newStatus ) ;
654- }
651+ element . classList . replace ( "item-status-" + currentStatus , "item-status-" + newStatus ) ;
655652
656653 if ( isListView ( ) && getVisibleEntries ( ) . length === 0 ) {
657654 window . location . reload ( ) ;
@@ -821,10 +818,7 @@ function openOriginalLinkFromListView() {
821818 goToListItem ( 1 ) ;
822819
823820 // Mark as read if currently unread
824- if ( currentItem . classList . contains ( "item-status-unread" ) ) {
825- currentItem . classList . remove ( "item-status-unread" ) ;
826- currentItem . classList . add ( "item-status-read" ) ;
827-
821+ if ( currentItem . classList . replace ( "item-status-unread" , "item-status-read" ) ) {
828822 const entryID = parseInt ( currentItem . dataset . id , 10 ) ;
829823 updateEntriesStatus ( [ entryID ] , "read" ) ;
830824 }
You can’t perform that action at this time.
0 commit comments