Skip to content

Commit 515d0eb

Browse files
committed
fix #486, respect animations disabled system-wide
1 parent 81f3723 commit 515d0eb

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ android {
5858
}
5959

6060
dependencies {
61-
implementation 'com.github.SimpleMobileTools:Simple-Commons:ac45c5e893'
61+
implementation 'com.github.SimpleMobileTools:Simple-Commons:e56c724d04'
6262
implementation 'com.github.Stericson:RootTools:df729dcb13'
6363
implementation 'com.github.Stericson:RootShell:1.6'
6464
implementation 'com.alexvasilkov:gesture-views:2.5.2'

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/ItemsFragment.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ class ItemsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerF
131131
items_list.adapter = this
132132
}
133133

134-
items_list.scheduleLayoutAnimation()
134+
if (context.areSystemAnimationsEnabled) {
135+
items_list.scheduleLayoutAnimation()
136+
}
137+
135138
val dateFormat = context!!.config.dateFormat
136139
val timeFormat = context!!.getTimeFormat()
137140
items_fastscroller.setViews(items_list, items_swipe_refresh) {

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
5959
recents_list.adapter = this
6060
}
6161

62-
recents_list.scheduleLayoutAnimation()
62+
if (context.areSystemAnimationsEnabled) {
63+
recents_list.scheduleLayoutAnimation()
64+
}
6365
}
6466

6567
override fun setupColors(textColor: Int, primaryColor: Int) {

0 commit comments

Comments
 (0)