refactor: add CardTemplateEditor.getIntent & introduce CardOrdinal#20056
refactor: add CardTemplateEditor.getIntent & introduce CardOrdinal#20056mikehardy merged 2 commits intoankidroid:mainfrom
Conversation
BrayanDSO
left a comment
There was a problem hiding this comment.
TemplatePreviewerViewModel could use CardOrdinal as well
de73ffc to
b9cf1c2
Compare
|
Re-requested a review as that added a number more |
b9cf1c2 to
36052ba
Compare
mikehardy
left a comment
There was a problem hiding this comment.
good to clarify a confusing concept, I remember when I was first learning about note types and ordinals and it took me quite a while to suss out. Likely reflected (still) in the code. Making everything as explicit as possible can't hurt
I was curious what this looked like for ephemeral items or partially specified items and it seems to make sense, e.g. if you just edit a note type but not on a particular card:
01-09 08:33:41.530 4025 4025 D CardTemplateEditor$Companion: Built intent for CardTemplateEditor; ntid: 1767965588557; nid: null; ord: null
(but everything works as it should)
As I'd expect. Let's go
Purpose / Description
Creating the CardTemplateEditor was unusual, as it creates an intent, then further modifies it.
I found this unclear when working on
From first glance, the
NoteIdwas unset (as it used a hardcoded string constant rather thanEDITOR_NOTE_IDApproach
CardOrdinal, as I didn't want to document oneIntparameter ongetIntentand ignore the restCardTemplateEditor.getIntentHow Has This Been Tested?
Logcat:
Built intent for CardTemplateEditor; ntid: 1381831066614; nid: 1767661996450; ord: 1Checklist