Android icon indicating copy to clipboard operation
Android copied to clipboard

Run Import/Export on non-UI thread

Open TheLastProject opened this issue 9 months ago • 1 comments

This seems to fix Android sometimes throwing NetworkOnMainThreadException when importing bit files through the Nextcloud app.

I'm not sure if this is necessary for the export too, but it doesn't seem to break anything so for consistency it makes sense to also wrap the exporter into a thread.

This change is suboptimal because it will still block the UI with a ProgressDialog (which is deprecated) and force the user to wait until the import/export completes (and will kill the import/export if the app gets backgrounded) but it should at least fix the most common crash for most users.

TheLastProject avatar May 21 '24 19:05 TheLastProject