fix recently used documents sorting

recently used documents were incorrectly sorted on when a file was first added to recently-used.xbel file, not reflecting when it was opened again later
this fix changes it so they are sorted correctly on when they were last used (when last their entry was modified in recently-used.xbel)

fixes https://github.com/linuxmint/mint20.2-beta/issues/10
This commit is contained in:
Vincent Vermeulen 2021-06-19 09:19:00 +02:00 committed by Michael Webster
parent 905b9b1a94
commit 9b96af6602

View File

@ -197,7 +197,7 @@ class pluginclass:
def GetRecent(self, *args, **kargs): def GetRecent(self, *args, **kargs):
FileString=[] FileString=[]
IconString=[] IconString=[]
RecentInfo=self.RecManagerInstance.get_items() RecentInfo=sorted(self.RecManagerInstance.get_items(), key=lambda item: item.get_modified(), reverse=True)
count=0 count=0
MaxEntries=self.numentries MaxEntries=self.numentries
if self.numentries == -1: if self.numentries == -1: