Skip to content

Migrate to new activity result API #1204

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

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

Conversation

equeim
Copy link
Contributor

@equeim equeim commented Jul 4, 2024

No description provided.

@QuantumBadger
Copy link
Owner

Thanks @equeim -- just a heads-up that I'll be merging the 2024-06-new-gallery branch into master within the next few days, so it would be great if these changes could be rebased onto that branch please.

@equeim equeim force-pushed the activity-result branch from e2ff4fc to 0c1fd1c Compare July 11, 2024 22:00
@equeim
Copy link
Contributor Author

equeim commented Jul 11, 2024

Rebased on master.

@QuantumBadger
Copy link
Owner

Thank you!

@QuantumBadger
Copy link
Owner

QuantumBadger commented Apr 20, 2025

Sorry for the delay in reviewing this.

I've done some testing, and this crashed for me while trying to save an image link in a comment:

java.lang.IllegalStateException: LifecycleOwner org.quantumbadger.redreader.activities.CommentListingActivity@a89016a is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.
at androidx.activity.result.ActivityResultRegistry.register(ActivityResultRegistry.java:121)
at androidx.activity.ComponentActivity.registerForActivityResult(ComponentActivity.java:885)
at androidx.activity.ComponentActivity.registerForActivityResult(ComponentActivity.java:894)
at org.quantumbadger.redreader.common.FileUtils.createSAFDocumentWithIntent(FileUtils.java:345)
at org.quantumbadger.redreader.common.FileUtils.lambda$saveImageAtUri$5(FileUtils.java:400)
at org.quantumbadger.redreader.common.FileUtils$$ExternalSyntheticLambda7.onSuccess(D8$$SyntheticClass:0)
at org.quantumbadger.redreader.common.FileUtils$2$1.onCacheFileWritten(FileUtils.java:640)
at org.quantumbadger.redreader.cache.CacheRequest.notifyCacheFileWritten(CacheRequest.java:298)
at org.quantumbadger.redreader.cache.CacheManager$RequestHandlerThread$1.run(CacheManager.java:744)
at org.quantumbadger.redreader.common.PrioritisedCachedThreadPool$Executor.run(PrioritisedCachedThreadPool.java:103)
at java.lang.Thread.run(Thread.java:923)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants