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: currentDeckId broken #17610

Merged
merged 1 commit into from
Dec 17, 2024
Merged

fix: currentDeckId broken #17610

merged 1 commit into from
Dec 17, 2024

Conversation

david-allison
Copy link
Member

@david-allison david-allison commented Dec 17, 2024

Purpose / Description

In a58b4c1, currentDeckId was updated to use a Kotlin-based builder, but [this.]did was coming from DeckIdKt.Dsl rather than from [this@Card.]did, so 0 was returned.

Fixes

Approach

  • Bisect the bad commit
  • Figure out the issue
  • Fix forward

How Has This Been Tested?

API 34 emulator, editing a note now shows the correct deck

Learning (optional, can help others)

⚠️: I also made a mistake with the implementation, I don't particularly like the Dsl

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@david-allison david-allison added the Review High Priority Request for high priority review label Dec 17, 2024
In a58b4c1, `currentDeckId`
was updated to use a Kotlin-based builder, but `[this.]did` was
coming from `DeckIdKt.Dsl` rather than from `[this@Card.]did`

Cause 17591
Fixes 17604 (Note Editor issues)
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️: I also made a mistake with the implementation, I don't particularly like the Dsl

Feel free to revert to the previous Builder syntax if you want. Both syntaxes are acceptable IMO, but in this case the Builder one led to less issues

@BrayanDSO BrayanDSO added the Needs Second Approval Has one approval, one more approval to merge label Dec 17, 2024
@david-allison
Copy link
Member Author

I'll leave it, but will be wary in the future

@lukstbit lukstbit added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Dec 17, 2024
@lukstbit lukstbit added this pull request to the merge queue Dec 17, 2024
Merged via the queue into ankidroid:main with commit 9827549 Dec 17, 2024
9 checks passed
@github-actions github-actions bot removed Review High Priority Request for high priority review Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) labels Dec 17, 2024
@github-actions github-actions bot added this to the 2.21 release milestone Dec 17, 2024
@david-allison david-allison deleted the 17604 branch December 17, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Note editor shows Default deck for all cards
3 participants