use sorting numbers by numeric values by default

This commit is contained in:
tibbi 2019-05-05 21:32:27 +02:00
parent af50584b39
commit 7f03b85e1b
4 changed files with 8 additions and 3 deletions

View file

@ -61,7 +61,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:5.12.12' implementation 'com.simplemobiletools:commons:5.12.15'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -149,6 +149,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
} }
} }
if (!config.wasSortingByNumericValueAdded) {
config.wasSortingByNumericValueAdded = true
config.sorting = config.sorting or SORT_USE_NUMERIC_VALUE
}
updateWidgets() updateWidgets()
registerFileUpdateListener() registerFileUpdateListener()
} }

View file

@ -540,7 +540,7 @@ class PhotoFragment : ViewPagerFragment() {
tag?.getValueAsInt(defaultOrientation) ?: defaultOrientation tag?.getValueAsInt(defaultOrientation) ?: defaultOrientation
} else { } else {
val exif = android.media.ExifInterface(path) val exif = android.media.ExifInterface(path)
exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, defaultOrientation) exif.getAttributeInt(TAG_ORIENTATION, defaultOrientation)
} }
if (orient == defaultOrientation || context!!.isPathOnOTG(mMedium.path)) { if (orient == defaultOrientation || context!!.isPathOnOTG(mMedium.path)) {

View file

@ -4,5 +4,5 @@
<integer name="media_columns_vertical_scroll">3</integer> <integer name="media_columns_vertical_scroll">3</integer>
<integer name="media_columns_horizontal_scroll">4</integer> <integer name="media_columns_horizontal_scroll">4</integer>
<integer name="default_sorting">1026</integer> <integer name="default_sorting">33794</integer>
</resources> </resources>