-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Checklist
- I have searched the existing issues for the same bug
- I have attached the log file as an attachment to this issue
Describe the bug
-
In SearchActivity.java, the onCreate method calls populateGroup, which performs numerous synchronous database operations. According to Android best practices, these potentially time-consuming database operations should be moved off the UI thread to prevent UI blocking when handling large datasets or complex operations. -
In StatusViewerActivity.java, the getCountPerStatus method used by getPageTitle, which is called in onResume, also involves database queries and should therefore be moved off the UI thread. -
In HistoryActivity.onCreate(), calling getHistory() performs a SQLite query and creates objects. If the history is large, it can block the UI. It should run on a background thread, with the UI thread only responsible for updating the interface.
-
In GalleryActivity.onCreate(), calling addGallery() performs a SQLite insert. If the data is large, it can block the UI. It is recommended to execute database writes on a background thread and update the UI only on the UI thread.
Steps To Reproduce
nothing
Expected behavior
Potentially time-consuming operations should not be executed on the UI thread.
Screenshots
No response
Android Version
13
App Version
4.1.2
Additional context
No response