-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: "Reviewing" & Deck import do not handle SchedV1 correctly #17857
base: main
Are you sure you want to change the base?
Conversation
@@ -100,38 +116,73 @@ class PreferencesFragment : | |||
caller: PreferenceFragmentCompat, | |||
pref: Preference, | |||
): Boolean { | |||
// Checks if the user needs to upgrade the scheduler before opening Reviewing | |||
if (pref.fragment == ReviewingSettingsFragment::class.jvmName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you do the check in the reviewing fragment itself? This looks messy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrayanDSO That could be done. But isn't this should be the ideal behaviour that "ReviewFragment" is not opened if the SchedV1 is not updated. If this is put in ReviewFragment, that would open the fragment even though nothing would be functional until Sched is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. It definitely looks much cleaner.
f5cfe55
to
f7c33b6
Compare
Since nothing should work on a V1 collection, I think that the dialog should be shown when entering the app (maybe in the database error dialog) and shouldn't be dismissible. That way we won't have the issue again in the future because we missed a screen, or because something new doesn't work on sched v1. It also should be simpler to code. |
@BrayanDSO I tried implementing that and it works fine. But the problem is in one of the case -> When the app has already opened the app and imports a v1 collection then in that case there won't be any checks that time as the app wasn't started so no dismissible dialog will be shown and we will have to handle it like this only. Let me know what you think here. |
Purpose / Description
"Reviewing" & Deck import do not handle SchedV1 correctly
Fixes
Approach
created a function to handle the update of SchedV1 inside Reviewing in Preferences Settings
How Has This Been Tested?
Physical device : Manually tested on Pixel 6a - Android 15
Before
screen-20250130-023513-2.mp4
After
screen-20250130-022757-2.mp4
Learning (optional, can help others)
Checklist
Please, go through these checks before submitting the PR.