Skip to content

Commit 4e51695

Browse files
Rename canRefreshThreads into isFirstTimeRefreshingThreads
1 parent d3fce7a commit 4e51695

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListFragment.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class ThreadListFragment : TwoPaneFragment(), SwipeRefreshLayout.OnRefreshListen
102102

103103
private val showLoadingTimer: CountDownTimer by lazy { Utils.createRefreshTimer(onTimerFinish = ::showRefreshLayout) }
104104

105-
private var canRefreshThreads = false
105+
private var isFirstTimeRefreshingThreads = true
106106

107107
@Inject
108108
lateinit var localSettings: LocalSettings
@@ -238,7 +238,7 @@ class ThreadListFragment : TwoPaneFragment(), SwipeRefreshLayout.OnRefreshListen
238238

239239
private fun refreshThreadsIfNotificationsAreDisabled() = with(mainViewModel) {
240240

241-
if (canRefreshThreads) {
241+
if (!isFirstTimeRefreshingThreads) {
242242
val areGoogleServicesDisabled = !playServicesUtils.areGooglePlayServicesAvailable()
243243
val areAppNotifsDisabled = !notificationManagerCompat.areNotificationsEnabled()
244244
val areMailboxNotifsDisabled = currentMailbox.value?.notificationsIsDisabled(notificationManagerCompat) == true
@@ -247,7 +247,7 @@ class ThreadListFragment : TwoPaneFragment(), SwipeRefreshLayout.OnRefreshListen
247247
if (shouldRefreshThreads) forceRefreshThreads()
248248
}
249249

250-
canRefreshThreads = true
250+
isFirstTimeRefreshingThreads = false
251251
}
252252

253253
private fun updateSwipeActionsAccordingToSettings() = with(binding.threadsList) {

0 commit comments

Comments
 (0)