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

Check associated resource metadatas before restoring previously selected one #509

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

KJoslyn
Copy link
Contributor

@KJoslyn KJoslyn commented Sep 16, 2019

Corresponds to OT-22

This change is Reviewable

@@ -28,6 +28,11 @@ class ChapterTabGroup : TabGroup() {
tabMap.clear()
}

private fun shouldRestoreActiveResourceMetadata(metadataToRestore: ResourceMetadata?): Boolean {
return metadataToRestore != null
&& getAssociatedMetadatas().toList().contains(metadataToRestore)
Copy link
Contributor

Choose a reason for hiding this comment

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

Fails linter

Copy link
Contributor

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).

Copy link
Contributor Author

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!

@aunger aunger requested a review from jsarabia September 17, 2019 02:57
Copy link
Contributor

@aunger aunger left a 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: :shipit: 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

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.

3 participants