Skip to content
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 shortcut to currently open deck in reviewer #17797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iamprathosh
Copy link

Fixes #17772

Add functionality to maintain the current card and state when reopening the app through a shortcut.

  • Modify IntentHandler.kt to check if the reviewer is already open and if the current deck matches the deck in the shortcut. If the reviewer is open and the deck matches, bring the app to the foreground without changing the current card. If the reviewer is not open or the deck does not match, proceed with the existing logic to open the deck.
  • Update Reviewer.kt to add methods to save and restore the current card and state when the app is minimized and reopened through a shortcut. Call these methods in the onPause and onResume methods.
  • Modify ReviewerUi.kt to add methods to save and restore the current card and state.

Fixes ankidroid#17772

Add functionality to maintain the current card and state when reopening the app through a shortcut.

* Modify `IntentHandler.kt` to check if the reviewer is already open and if the current deck matches the deck in the shortcut. If the reviewer is open and the deck matches, bring the app to the foreground without changing the current card. If the reviewer is not open or the deck does not match, proceed with the existing logic to open the deck.
* Update `Reviewer.kt` to add methods to save and restore the current card and state when the app is minimized and reopened through a shortcut. Call these methods in the `onPause` and `onResume` methods.
* Modify `ReviewerUi.kt` to add methods to save and restore the current card and state.
Copy link

welcome bot commented Jan 11, 2025

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

Mizokuiam

This comment was marked as spam.

@Mizokuiam

This comment was marked as spam.

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jan 11, 2025
@david-allison
Copy link
Member

CI is failing

@Arthur-Milchior
Copy link
Member

Hi, @iamprathosh Thanks a lot for working on this. Have you tried your change? Because I can't build it. Can you let us know whether you can try to update it or whether we should close it.

Is this LLM generated by any luck? because I don't even understand where isReviewerOpen would come from

Copy link
Contributor

Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Author Reply Waiting for a reply from the original author New contributor Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shortcut to the currently open deck should not close the stack
4 participants