#664 disable pull to refresh when user not synced
This commit is contained in:
parent
7037649784
commit
44da1202cc
|
@ -90,6 +90,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
|
||||
if (config.caldavSync) {
|
||||
refreshCalDAVCalendars(false)
|
||||
swipe_refresh_layout.setOnRefreshListener { refreshCalDAVCalendars(false) }
|
||||
}
|
||||
|
||||
if (!checkViewIntents()) {
|
||||
|
@ -129,6 +130,10 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
search_placeholder_2.setTextColor(config.textColor)
|
||||
calendar_fab.setColors(config.textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
||||
search_holder.background = ColorDrawable(config.backgroundColor)
|
||||
|
||||
swipe_refresh_layout.run {
|
||||
isEnabled = config.caldavSync
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -368,6 +373,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
if (showCalDAVRefreshToast) {
|
||||
toast(R.string.refreshing_complete)
|
||||
}
|
||||
swipe_refresh_layout.isRefreshing = false
|
||||
}
|
||||
}, CALDAV_SYNC_DELAY)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue