frontpage: Read custom shortcuts from multiple locations

Read from /etc/plinth, /usr/share/plinth and /var/lib/plinth.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2020-06-28 21:01:17 -04:00
1 parent 4263f9e2c8
commit 5b579ff06d
3 files changed
+20 -15

No files matched your search

+1 -3
View File
@@ -40,9 +40,7 @@ def get_shortcuts_as_json(username=None):
for shortcut in frontpage.Shortcut.list(username)
if shortcut.component_id and shortcut.is_enabled()
]
custom_shortcuts = frontpage.get_custom_shortcuts()
if custom_shortcuts:
shortcuts += custom_shortcuts['shortcuts']
shortcuts += frontpage.get_custom_shortcuts()['shortcuts']
return {'shortcuts': shortcuts}