diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt index f0223fbaffd1a3720dbe2e939504fe6015ea461b..a9abd17ba3605ae046a238bfae79010451a0f50f 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt @@ -8,6 +8,7 @@ import android.content.Intent import android.content.IntentSender import android.content.res.Configuration import android.graphics.Color +import android.graphics.PorterDuffColorFilter import android.os.Bundle import android.os.Parcelable import android.util.TypedValue @@ -21,6 +22,7 @@ import android.widget.Toast import androidx.appcompat.app.ActionBar import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.DrawerListener import androidx.fragment.app.FragmentManager @@ -334,6 +336,7 @@ open class MessageList : private fun initializeLayout() { progressBar = findViewById(R.id.message_list_progress) + progressBar?.progressDrawable?.colorFilter = PorterDuffColorFilter(ContextCompat.getColor(this, R.color.color_default_accent), android.graphics.PorterDuff.Mode.SRC_IN) messageViewPlaceHolder = PlaceholderFragment() } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index 246f6d9ef0286808eb25f3b95e5e99ebdf1bc616..d9ed537feefc03c78cc394021df82bf1c1c2f087 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -315,15 +315,16 @@ class MessageListFragment : } private fun setWindowProgress() { - var level = 0 if (currentFolder?.loading == true) { + var level = 0 val folderTotal = activityListener.getFolderTotal() if (folderTotal > 0) { level = (MAX_PROGRESS * activityListener.getFolderCompleted() / folderTotal).coerceAtMost(MAX_PROGRESS) } + fragmentListener.setMessageListProgress(level) + } else { + fragmentListener.setMessageListProgressEnabled(false) } - - fragmentListener.setMessageListProgress(level) } private fun setWindowTitle() {