davx5-ose icon indicating copy to clipboard operation
davx5-ose copied to clipboard

Rewrite DebugInfoActivity to M3

Open sunkup opened this issue 1 year ago • 0 comments

Purpose

Rewriting the DebugInfoActivity from M2 to M3, refactoring for more clarity, stability and test-ability at the same time.

Short description

As requested, I have not yet moved debug info generation into a data layer class. I have however added comments about this in the kdoc. Note, that I, however, moved the IntentBuilder to the ViewModel too, which should probably go to another helper/convenience class, since it's seemingly used throughout the whole app.

Enhancement

  • Replaces M2 with M3 calls

Refactoring

  • Extracts composables from activity to their own file as a dedicated compose "screen"
  • Extracts view model from activity to its own file
  • Switches from LiveData to compose mutableState and flows
  • Introduces a private set (read-only) uiState in view model for the screen

Checklist

  • [X] The PR has a proper title, description and label.
  • [x] I have self-reviewed the PR.
  • [x] I have added documentation to complex functions and functions that can be used by other modules.
  • [x] I have added reasonable tests or consciously decided to not add tests.

sunkup avatar Apr 23 '24 10:04 sunkup