perf: optimize loading messages in threads (#552)

* perf: improve lazy loading and remove spinner

* perf: optimize message loading by caching and reducing queries

* docs: update changelog

* style: use constant for cache size

* refactor: minor consistency improvement

* fix: override loaded preview size

* refactor: streamline message loading logic in scroll listener

* refactor: organize some dedup related code

* build: bump detekt return count limit

2 is 2 low

* fix: check contacts permissions before registering observer

* fix: disable fetching media resolutions in threads

* refactor: remove resolution fetching related code

* perf: cache MMS thread participants

* refactor: remove unused BitmapFactory import

* fix: invalidate participants cache when necessary

* fix: return copied participants from cache

* fix: adjust image loading dimensions in threads

* fix: use stable ids for header items

* fix: always rely on database check before flipping `allMessagesFetched`
This commit is contained in:
Naveen Singh 2025-10-15 00:46:45 +05:30 committed by GitHub
parent d6160b8448
commit 72eb0af8ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 283 additions and 251 deletions

View file

@ -116,6 +116,7 @@
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="ifContentScrolls"
android:paddingTop="@dimen/big_margin"
android:paddingBottom="@dimen/medium_margin"
android:scrollbars="none"
app:layoutManager="org.fossify.commons.views.MyLinearLayoutManager"

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingVertical="@dimen/normal_margin">
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/thread_loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="@dimen/small_margin"
android:indeterminate="true"
app:indicatorSize="@dimen/big_margin"
app:trackCornerRadius="@dimen/normal_margin" />
</LinearLayout>