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

Don't use activity.isFinishing() #2159

Merged
merged 1 commit into from
Oct 9, 2022

Conversation

nielsvanvelzen
Copy link
Member

With the new destination code we always have a single activity so we don't need to check if it's finished, we need to check the fragment lifecycle instead.

Changes

  • Don't use activity.isFinishing()

Issues

@nielsvanvelzen nielsvanvelzen added the bug Something isn't working label Oct 9, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Oct 9, 2022
@@ -180,7 +180,7 @@
super.onResume()

//React to deletion
if (activity != null && !requireActivity().isFinishing && currentRow != null && currentItem != null && currentItem!!.getItemId() != null && currentItem!!.getItemId().equals(dataRefreshService.lastDeletedItemId)) {
if (currentRow != null && currentItem != null && currentItem!!.getItemId() != null && currentItem!!.getItemId().equals(dataRefreshService.lastDeletedItemId)) {

Check warning

Code scanning / detekt

Complex conditions should be simplified and extracted into well-named methods if necessary.

This condition is too complex (4). Defined complexity threshold for conditions is set to '4'
@@ -180,7 +180,7 @@
super.onResume()

//React to deletion
if (activity != null && !requireActivity().isFinishing && currentRow != null && currentItem != null && currentItem!!.getItemId() != null && currentItem!!.getItemId().equals(dataRefreshService.lastDeletedItemId)) {
if (currentRow != null && currentItem != null && currentItem!!.getItemId() != null && currentItem!!.getItemId().equals(dataRefreshService.lastDeletedItemId)) {

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style.

Line detected, which is longer than the defined maximum line length in the code style.
@nielsvanvelzen nielsvanvelzen merged commit 6bdde2c into jellyfin:master Oct 9, 2022
@nielsvanvelzen nielsvanvelzen deleted the activity-finishing branch October 9, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant