-
Notifications
You must be signed in to change notification settings - Fork 1
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
Check associated resource metadatas before restoring previously selected one #509
base: dev
Are you sure you want to change the base?
Conversation
@@ -28,6 +28,11 @@ class ChapterTabGroup : TabGroup() { | |||
tabMap.clear() | |||
} | |||
|
|||
private fun shouldRestoreActiveResourceMetadata(metadataToRestore: ResourceMetadata?): Boolean { | |||
return metadataToRestore != null | |||
&& getAssociatedMetadatas().toList().contains(metadataToRestore) |
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.
Fails linter
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.
Can probably do this on the sequence without building a list with toList
(but the method might not be contains
).
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.
Actually contains
is a method of a sequence- my code completion took too long to load and only loaded a few methods so I thought it didn't exist!
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @SarabiaJ)
src/main/kotlin/org/wycliffeassociates/otter/jvm/app/ui/chromeablestage/tabgroups/ChapterTabGroup.kt, line 33 at r1 (raw file):
Previously, KJoslyn wrote…
Actually
contains
is a method of a sequence- my code completion took too long to load and only loaded a few methods so I thought it didn't exist!
LGTM
Corresponds to OT-22
This change is