From 4435c96726b265e6980588089a62fbec640f6150 Mon Sep 17 00:00:00 2001 From: Satyajit Pradhan Date: Mon, 18 Nov 2019 04:38:10 +0530 Subject: [PATCH] Fixed Image Delete Issue , TrashBin Issue and More Clicking on Delete Icon on the Toolbar now deletes all the images. Fixed issue when images of same name are added by changing the PrimaryKey from binPath to an auto_increment id. Fixed an issue in which files are not deleted from ".nomedia" directory. Also Updated some external library versions. Fixed Image Delete Issue , TrashBin Issue and More Clicking on Delete Icon on the Toolbar now deletes all the images. Fixed issue when images of same name are added by changing the PrimaryKey from binPath to an auto_increment id. Fixed an issue in which files are not deleted from ".nomedia" directory. Also Updated some external library versions. Update build.gradle Origin NullFix and Search Fix Images stored in Root directory or /sdcard now won't show or store null value as name. As a result on search and sorting , there would be no crash or termination since we are giving a name to the folder incase of that image is stored in /sdcard. Done with gradlew SpotlessApply --- app/build.gradle | 2 +- .../phimpme/gallery/data/providers/MediaStoreProvider.java | 5 ++++- app/src/main/res/values/strings.xml | 1 + build.gradle | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 19a777a0f..77c781e8d 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,7 +31,7 @@ android { defaultConfig { applicationId "org.fossasia.phimpme" minSdkVersion 21 - targetSdkVersion 29 + targetSdkVersion 28 versionCode 12 versionName '1.9.0' multiDexEnabled true diff --git a/app/src/main/java/org/fossasia/phimpme/gallery/data/providers/MediaStoreProvider.java b/app/src/main/java/org/fossasia/phimpme/gallery/data/providers/MediaStoreProvider.java index 12a49d605..c89c59f6b 100644 --- a/app/src/main/java/org/fossasia/phimpme/gallery/data/providers/MediaStoreProvider.java +++ b/app/src/main/java/org/fossasia/phimpme/gallery/data/providers/MediaStoreProvider.java @@ -8,6 +8,7 @@ import java.io.File; import java.util.ArrayList; import java.util.HashSet; +import org.fossasia.phimpme.R; import org.fossasia.phimpme.gallery.data.Album; import org.fossasia.phimpme.gallery.data.CustomAlbumsHelper; import org.fossasia.phimpme.gallery.data.Media; @@ -119,7 +120,9 @@ public static ArrayList getAlbums(Context context) { context, path, cur.getLong(idColumn), - cur.getString(nameColumn), + cur.getString(nameColumn) == null + ? context.getString(R.string.sd_card_root_name) + : cur.getString(nameColumn), getAlbumCount(context, cur.getLong(idColumn))); if (album.addMedia(getLastMedia(context, album.getId()))) list.add(album); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 553648d0e..dfe40ebbd 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1439,4 +1439,5 @@ fb://page/ phimpmeapp https://www.facebook.com/phimpmeapp + SdCard diff --git a/build.gradle b/build.gradle index 464b00e68..8b49850e0 100755 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:3.5.2' classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4' classpath "io.realm:realm-gradle-plugin:$realm_version" classpath "gradle.plugin.com.github.b3er.local.properties:local-properties-plugin:1.1"