Skip to main content

Module start_menu

Module start_menu 

Source
Expand description

The widescreen Main Menu’s pins: what a user keeps one click away, in the rail’s shape (RailLayout) and synced the same way, as its own document (vector/start, crate::synced_prefs::Pref::Start).

A pin’s key names what it opens, in the grammar links already use, so a key means the same thing on every device and needs nothing stored beside it:

  app/<nexus app id>                 a Mini App from the Nexus, launched
  dm/<npub>                          a conversation
  c/<community>[/<channel>]          a community, or one of its channels
  settings[/<category>[/<section>]]  a place in Settings
  nexus | requests                   the Nexus, the Requests list

What a key shows (a name, an icon) is resolved on the device from what it holds; a key it cannot resolve keeps its place, as the rail keeps a community it has not synced.

Constants§

MAX_PINS
Enough for any launcher, few enough that a malformed document stays small.

Functions§

is_pin_key
Whether key is a pin this build can open.
pin
Pin key at the end. Ok(false) when it is pinned already.
unpin
Take key off Start, out of whichever folder holds it. false when it wasn’t pinned.