mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 20:30:58 +01:00
use list animations only if they arent disabled in the system
This commit is contained in:
parent
70b0e93e0c
commit
e1017d9c72
@ -24,6 +24,7 @@ import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||
import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
|
||||
import com.simplemobiletools.calendar.pro.models.Event
|
||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||
import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled
|
||||
import com.simplemobiletools.commons.extensions.beGone
|
||||
import com.simplemobiletools.commons.extensions.beVisible
|
||||
import kotlinx.android.synthetic.main.fragment_day.view.*
|
||||
@ -124,7 +125,10 @@ class DayFragment : Fragment() {
|
||||
}.apply {
|
||||
mHolder.day_events.adapter = this
|
||||
}
|
||||
mHolder.day_events.scheduleLayoutAnimation()
|
||||
|
||||
if (requireContext().areSystemAnimationsEnabled) {
|
||||
mHolder.day_events.scheduleLayoutAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
private fun editEvent(event: Event) {
|
||||
|
@ -123,7 +123,10 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
||||
mView.calendar_events_list.adapter = this
|
||||
}
|
||||
|
||||
mView.calendar_events_list.scheduleLayoutAnimation()
|
||||
if (requireContext().areSystemAnimationsEnabled) {
|
||||
mView.calendar_events_list.scheduleLayoutAnimation()
|
||||
}
|
||||
|
||||
mView.calendar_events_list.endlessScrollListener = object : MyRecyclerView.EndlessScrollListener {
|
||||
override fun updateTop() {
|
||||
fetchPreviousPeriod()
|
||||
|
@ -23,6 +23,7 @@ import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
|
||||
import com.simplemobiletools.calendar.pro.models.DayMonthly
|
||||
import com.simplemobiletools.calendar.pro.models.Event
|
||||
import com.simplemobiletools.calendar.pro.models.ListEvent
|
||||
import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||
import kotlinx.android.synthetic.main.fragment_month_day.*
|
||||
@ -153,7 +154,10 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene
|
||||
}.apply {
|
||||
month_day_events_list.adapter = this
|
||||
}
|
||||
month_day_events_list.scheduleLayoutAnimation()
|
||||
|
||||
if (requireContext().areSystemAnimationsEnabled) {
|
||||
month_day_events_list.scheduleLayoutAnimation()
|
||||
}
|
||||
} else {
|
||||
(currAdapter as EventListAdapter).updateListItems(listItems)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user