summaryrefslogtreecommitdiff
path: root/py_modules/lsfg_vk/flatpak_profile_service.py
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-11 09:05:14 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-11 09:05:14 -0400
commitd2bfdafa92f3d31cc5392bf8a5a1f1df5c2358ce (patch)
tree102c12dc843ce64dd21599c2cf8ae3d5a3bd0104 /py_modules/lsfg_vk/flatpak_profile_service.py
parent904e2e6131071c3b132d3148947b613c2830b1bb (diff)
downloaddecky-lsfg-vk-d2bfdafa92f3d31cc5392bf8a5a1f1df5c2358ce.tar.gz
decky-lsfg-vk-d2bfdafa92f3d31cc5392bf8a5a1f1df5c2358ce.zip
flatpak correctness, ui alignment, tests
Diffstat (limited to 'py_modules/lsfg_vk/flatpak_profile_service.py')
-rw-r--r--py_modules/lsfg_vk/flatpak_profile_service.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/py_modules/lsfg_vk/flatpak_profile_service.py b/py_modules/lsfg_vk/flatpak_profile_service.py
index ddec116..9eaf9c7 100644
--- a/py_modules/lsfg_vk/flatpak_profile_service.py
+++ b/py_modules/lsfg_vk/flatpak_profile_service.py
@@ -202,7 +202,7 @@ class FlatpakProfileService:
result = self.configuration_service.update_flatpak_config(app_id, config)
if not result.get("success"):
raise RuntimeError(result.get("error") or "Could not update Flatpak profile")
- return self.get_app(app_id)
+ return result
except Exception as error:
return {
"success": False,
@@ -374,8 +374,16 @@ class FlatpakProfileService:
"app_id": fields[0],
"active": active,
"pid": fields[2].strip() if len(fields) > 2 else "",
+ "start_time": self.flatpak_service._process_start_time(
+ fields[2].strip() if len(fields) > 2 else ""
+ ),
})
- running.sort(key=lambda item: (not item["active"], item["app_id"]))
+ running.sort(key=lambda item: (
+ not item["active"],
+ -(item["start_time"] if isinstance(item["start_time"], int) else -1),
+ -int(item["pid"]) if str(item["pid"]).isdigit() else 1,
+ item["app_id"],
+ ))
return {"success": True, "message": "", "error": None, "apps": running}
except Exception as error:
return {"success": False, "message": "", "error": str(error), "apps": []}