From 85910592e134e9fcb0d85c1da9d2f106e319e3c2 Mon Sep 17 00:00:00 2001 From: Ksaper Date: Tue, 14 Feb 2023 03:14:50 +0200 Subject: [PATCH] Use get_id here, it's just suffixed with .desktop in the end --- widget/app_launcher/init.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/widget/app_launcher/init.lua b/widget/app_launcher/init.lua index d8cf4ff..3dfd9e9 100644 --- a/widget/app_launcher/init.lua +++ b/widget/app_launcher/init.lua @@ -493,11 +493,11 @@ local function generate_apps(self) if self.sort_alphabetically then table.sort(apps, function(a, b) local app_a_score = app_info.get_name(a):lower() - if has_value(self.favorites, app_info.get_name(a)) then + if has_value(self.favorites, app_info.get_id(a)) then app_a_score = "aaaaaaaaaaa" .. app_a_score end local app_b_score = app_info.get_name(b):lower() - if has_value(self.favorites, app_info.get_name(b)) then + if has_value(self.favorites, app_info.get_id(b)) then app_b_score = "aaaaaaaaaaa" .. app_b_score end @@ -506,11 +506,11 @@ local function generate_apps(self) elseif self.reverse_sort_alphabetically then table.sort(apps, function(a, b) local app_a_score = app_info.get_name(a):lower() - if has_value(self.favorites, app_info.get_name(a)) then + if has_value(self.favorites, app_info.get_id(a)) then app_a_score = "zzzzzzzzzzz" .. app_a_score end local app_b_score = app_info.get_name(b):lower() - if has_value(self.favorites, app_info.get_name(b)) then + if has_value(self.favorites, app_info.get_id(b)) then app_b_score = "zzzzzzzzzzz" .. app_b_score end @@ -518,8 +518,8 @@ local function generate_apps(self) end) else table.sort(apps, function(a, b) - local app_a_favorite = has_value(self.favorites, app_info.get_name(a)) - local app_b_favorite = has_value(self.favorites, app_info.get_name(b)) + local app_a_favorite = has_value(self.favorites, app_info.get_id(a)) + local app_b_favorite = has_value(self.favorites, app_info.get_id(b)) if app_a_favorite and not app_b_favorite then return true