Skip to content

The settings root's debug button appears late or not at all, and the back pill widens without it #228

Closed

Description

@lumenpearson

What is broken. On the settings root, the square debug button to the right of «← Настройки» is sometimes missing for a moment after the app opens, sometimes missing until the screen is left and re-entered. While it is missing, the back pill is laid out wider. Owner's words: «кнопка дебага может отсутствовать на долю секунды и появиться, а может и не прогрузиться, и только при перезаходе на этот главный экран настроек - она прогружается».

Cause.

  • The button is shown only to a class manager, and the role comes only from the server's /me.
  • That answer is kept in memory and starts unknown on every launch (DeviceLinkState.Idle).
  • It is asked for by a LaunchedEffect in the settings root itself, when the reader is already looking at the bar.
  • A fast answer shows the button a fraction of a second late. A slow or failed one (Failed(known = null)) never shows it, until re-entering the root runs the effect again.
  • The bar has two HorizontalFloatingToolbar layouts, with and without an action, so the pill jumps between them.

Expected.

  • The last role the server gave for this class is remembered on the device and drawn from the first frame.
  • A fresh answer replaces it, including a fresh «no».
  • The request starts with the shell rather than with the settings page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions