Skip to content

fix(preview-text-string-fragment): edit#16893

Merged
alperozturk96 merged 2 commits intomasterfrom
improve-text-string-fragment
Apr 22, 2026
Merged

fix(preview-text-string-fragment): edit#16893
alperozturk96 merged 2 commits intomasterfrom
improve-text-string-fragment

Conversation

@alperozturk96
Copy link
Copy Markdown
Collaborator

@alperozturk96 alperozturk96 commented Apr 21, 2026

Issue

Thread creation was not life cycle aware and nullability needs to be checked

Exception in thread "Thread-75" java.lang.NullPointerException: Attempt to invoke interface method 'com.owncloud.android.ui.helpers.FileOperationsHelper com.owncloud.android.ui.fragment.FileFragment$ContainerActivity.getFileOperationsHelper()' on a null object reference
    at com.owncloud.android.ui.preview.PreviewTextStringFragment.lambda$edit$1(PreviewTextStringFragment.java:139)
    at com.owncloud.android.ui.preview.PreviewTextStringFragment.$r8$lambda$_MpHYWLzP65yyRQaF66kF_Bz0rY(Unknown Source:0)
    at com.owncloud.android.ui.preview.PreviewTextStringFragment$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
    at java.lang.Thread.run(Thread.java:1564)

Changes

  • Replaces Java class with Kotlin uses LifecycleScope to make fully lifecycle aware and handle nullability
  • Replaces hardcoded "Error" message with meaningful error message via translation support

@alperozturk96
Copy link
Copy Markdown
Collaborator Author

/backport to stable-33.1.0

@github-actions
Copy link
Copy Markdown

APK file: https://github.com/nextcloud/android/actions/runs/24727040649/artifacts/6557347597
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@tobiasKaminsky tobiasKaminsky force-pushed the improve-text-string-fragment branch from f584b2f to 2f70054 Compare April 22, 2026 05:00
@github-actions
Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness6968
Dodgy code224222
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4242
Security1616
Total430427

@github-actions
Copy link
Copy Markdown

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@alperozturk96 alperozturk96 merged commit ac26ffd into master Apr 22, 2026
17 of 21 checks passed
@alperozturk96 alperozturk96 deleted the improve-text-string-fragment branch April 22, 2026 06:08
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.

Not being able to open README.MD file on Android app

2 participants