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):
FileString=[]
IconString=[]
RecentInfo=self.RecManagerInstance.get_items()
RecentInfo=sorted(self.RecManagerInstance.get_items(), key=lambda item: item.get_modified(), reverse=True)
count=0
MaxEntries=self.numentries
if self.numentries == -1: