Draft: Emergency menu refactor

Open Thomas requested to merge CoderThomasB/phosh:emergency-menu-refactor into main

After looking back at my code I realized a few ways that I could have better implemented the emergency menu, so this MR contains my changes and refactor to the menu after looking back at it.

Some notable difference are:

  • EmergencyContact is now a boxed struct rather than a full GObject mostly because it doesn't need to be, and it was just a lot of extra code when it could have just been a box.
  • EmerrgecyCallsManager now has a public update function that fetches and updates the contacts and if not connected to DBus tries to connect. This is mostly because I am planning for this function to get called when the emergency menu is opened, so if there was trouble connecting to DBus it will try again and the emergency contacts will be up-to-date; my plan was that if the user opens the menu, Phosh will have a 'second go' at fetching the emergency info meaning that if something goes wrong during the initial emergency calls setup then it might work again which is important for the emergency menu.
  • Some spelling fixes

This MR is currently a draft, and I am taking feedback.

Edited by Thomas

Merge request reports