From 06fa70dc16cbcaf16958599790fc5a5df2a50639 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 4 Dec 2018 19:35:19 +0100 Subject: [PATCH] avoid rechecking caldav calendars twice at app launch --- .../calendar/pro/activities/MainActivity.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt index 395a861ad..be537ebb9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/MainActivity.kt @@ -372,14 +372,12 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { } private fun calDAVChanged() { - recheckCalDAVCalendars { - refreshViewPager() - if (showCalDAVRefreshToast) { - toast(R.string.refreshing_complete) - } - runOnUiThread { - swipe_refresh_layout.isRefreshing = false - } + refreshViewPager() + if (showCalDAVRefreshToast) { + toast(R.string.refreshing_complete) + } + runOnUiThread { + swipe_refresh_layout.isRefreshing = false } }