CCExtractor / ultimate_alarm_clock

GNU General Public License v2.0
68 stars 122 forks source link

Fix: AddOrUpdateAlarmController initializing ahead of time causing multiple bugsArchitectural change #552

Closed keyurgit45 closed 2 months ago

keyurgit45 commented 4 months ago

Description

AddOrUpdateAlarmController is initialized with bottomNavigationBarBindings instead of the AddOrUpdateAlarmView, due to a dependency issue with InputTimeController. It depends on both AddOrUpdateAlarmController and TimerController, and gets initialized in the timer view, causing these controllers to be initialized when the bottom navigation bar is created.

Proposed Changes

I have decomposed InputTimeController into two controllers named AlarmInputTimeController and TimerInputTimeController, each consisting of their independent logic. By refactoring in this way, the AddOrUpdateAlarmController need not be initialized with bottomNavigationBarBindings; instead, it can be initialized with AddOrUpdateAlarmView.

Fixes #549

Checklist

AryanSarafDev commented 2 months ago

It had some conflicts with the current code, so modified your solution myself and made a pr. Thank you for the contribution!