From 06b641692608841a9f9a444f65987fce7c2aaa63 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 29 Nov 2021 22:55:14 +0100 Subject: [PATCH] animate the thumbnail appearance only if animations arent disabled in the system --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 2 +- .../simplemobiletools/gallery/pro/activities/MediaActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 92b1ba9bc..19f89a985 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -1196,7 +1196,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { directories_grid.adapter = this setupScrollDirection() - if (config.viewTypeFolders == VIEW_TYPE_LIST) { + if (config.viewTypeFolders == VIEW_TYPE_LIST && areSystemAnimationsEnabled) { directories_grid.scheduleLayoutAnimation() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index bf0c3f0f1..6b8150a60 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -420,7 +420,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { } val viewType = config.getFolderViewType(if (mShowAll) SHOW_ALL else mPath) - if (viewType == VIEW_TYPE_LIST) { + if (viewType == VIEW_TYPE_LIST && areSystemAnimationsEnabled) { media_grid.scheduleLayoutAnimation() }