Skip to content
Snippets Groups Projects

Draft: Cleaning status bar feature + Refactoring HUD

Closed Bruno Muniz requested to merge clean-status-bar-feature into development
2 unresolved threads

This MR contains:

  • Removal of ThemeFeature that wasn't used
  • Creation of a StatusBarFeature which contains a refactor of the old ThemeFeature.
  • Refactor of HUDFeature
Edited by Bruno Muniz

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
14 14 public override func viewDidLoad() {
15 15 super.viewDidLoad()
16 16 view.backgroundColor = Asset.neutralWhite.color
17 hud.update(with: .on(nil))
17 hud.subject.send(.on(nil))
  • 1 public enum HUDStatus: Equatable {
    2 case on(String?)
    3 case none
    4 case error(HUDErrorModel)
    • Comment on lines +1 to +4

      In general, we don't need a none case in enums. It's better to use native swift optional for this.

      enum HUDStatus {
        case on(String?)
        case error(HUDErrorModel)
      }

      and to store HUDStatus in a property, we can do:

      var hudStatus: HUDStatus?

      where nil equals to Optional<HUDStatus>.none (because swift optional is an enum too) and means there is no HUD to be presented.

    • Please register or sign in to reply
  • Bruno Muniz deleted the generic-toaster branch. This merge request now targets the development branch

    deleted the generic-toaster branch. This merge request now targets the development branch

  • closed

  • Please register or sign in to reply
    Loading