Skip to content

Commit 20506cf

Browse files
Refactored AdapterNews and NewsFragment to prevent ANRs caused by synchronous Realm queries on the main thread.
- Introduced `NewsItemData` DTO to decouple the adapter from Realm. - Moved data fetching and processing to a background coroutine in `NewsFragment`. - `AdapterNews` now uses `ListAdapter` with the `NewsItemData` DTO, removing all direct database access. - Image paths are now pre-fetched in a single batch query, eliminating per-item lookups in `onBindViewHolder`.
1 parent b1fb1b9 commit 20506cf

File tree

7 files changed

+1141
-42
lines changed

7 files changed

+1141
-42
lines changed

0 commit comments

Comments
 (0)