[vlc-commits] [Git][videolan/vlc][master] qml/MLContextMenu: Update the 'isNew' visibility functions

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Jan 14 13:48:50 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
2bb31fd7 by Benjamin Arnaud at 2023-01-14T13:35:11+00:00
qml/MLContextMenu: Update the 'isNew' visibility functions

- - - - -


1 changed file:

- modules/gui/qt/util/qml/MLContextMenu.qml


Changes:

=====================================
modules/gui/qt/util/qml/MLContextMenu.qml
=====================================
@@ -148,11 +148,20 @@ NativeMenu {
         if (indexes.length !== 1)
             return false
 
-        return model.getDataAt(indexes[0]).isNew
+        var isNew = model.getDataAt(indexes[0]).isNew
+
+        // NOTE: Strictly comparing 'isNew' given it might be undefined.
+        return (isNew === true)
     }
 
     function _showUnseen(options, indexes) {
-        return (_showSeen(options, indexes) === false)
+        if (indexes.length !== 1)
+            return false
+
+        var isNew = model.getDataAt(indexes[0]).isNew
+
+        // NOTE: Strictly comparing 'isNew' given it might be undefined.
+        return (isNew === false)
     }
 
     function _signalShowInformation(dataList, options) {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2bb31fd7c75c6dfa70815a478ceb9b2f3cb63f5b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2bb31fd7c75c6dfa70815a478ceb9b2f3cb63f5b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list