diff --git a/app/build.gradle b/app/build.gradle index 489f08bd..a37d79ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,7 +35,7 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 33 - versionCode 22 + versionCode 23 versionName "1.0.beta" + versionCode //TODO add resConfigs("en", "fr", "ja",...) ? @@ -189,7 +189,7 @@ dependencies { implementation 'com.google.android.material:material:1.8.0' //Dagger (dependency injection) - implementation 'com.google.dagger:dagger-android:2.44' + implementation 'com.google.dagger:dagger-android:2.45' implementation 'com.google.dagger:dagger-android-support:2.44' // if you use the support libraries kapt 'com.google.dagger:dagger-android-processor:2.44' @@ -199,7 +199,7 @@ dependencies { implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0' - implementation 'io.reactivex.rxjava3:rxjava:3.1.5' + implementation 'io.reactivex.rxjava3:rxjava:3.1.6' implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' implementation 'com.github.connyduck:sparkbutton:4.1.0' @@ -239,7 +239,7 @@ dependencies { implementation 'me.relex:circleindicator:2.1.6' - implementation "com.mikepenz:aboutlibraries-core:10.5.2" + implementation 'com.mikepenz:aboutlibraries-core:10.6.0' /** * Not in release, so not mentioned in licenses list diff --git a/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt b/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt index 55b79c40..e492def2 100644 --- a/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt +++ b/app/src/main/java/org/pixeldroid/app/postCreation/camera/CameraFragment.kt @@ -29,11 +29,12 @@ import androidx.camera.lifecycle.ProcessCameraProvider import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat import androidx.core.net.toUri +import androidx.core.view.isVisible import androidx.core.view.setPadding import androidx.lifecycle.lifecycleScope import com.bumptech.glide.Glide import com.bumptech.glide.request.RequestOptions -import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.google.android.material.snackbar.Snackbar import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.pixeldroid.app.R @@ -216,6 +217,7 @@ class CameraFragment : BaseFragment() { ) { updateGalleryThumbnail() } + //TODO check if we can get rid of this filePermissionDialogLaunched check (& the variable) else if (!filePermissionDialogLaunched) { // Ask for external storage permission. updateGalleryThumbnailPermissionLauncher.launch( @@ -268,10 +270,8 @@ class CameraFragment : BaseFragment() { ) { isGranted: Boolean -> if (isGranted) { updateGalleryThumbnail() - } else if(!filePermissionDialogLaunched){ - MaterialAlertDialogBuilder(requireContext()) - .setMessage(getString(R.string.no_storage_permission)) - .setPositiveButton(android.R.string.ok) { _, _ ->}.show() + } else { + //TODO should we show the user some message like we did until 75ae26fa4755530794267041de1038f3302ec306 ? filePermissionDialogLaunched = true } } @@ -349,11 +349,10 @@ class CameraFragment : BaseFragment() { private val bindCameraPermissionLauncher = registerForActivityResult(ActivityResultContracts.RequestPermission() ) { isGranted: Boolean -> if (isGranted) { + binding.cameraPermissionErrorCard.isVisible = false bindCameraUseCases() } else { - MaterialAlertDialogBuilder(requireContext()) - .setMessage(R.string.no_camera_permission) - .setPositiveButton(android.R.string.ok) { _, _ ->}.show() + binding.cameraPermissionErrorCard.isVisible = true } } diff --git a/app/src/main/res/drawable/error.xml b/app/src/main/res/drawable/error.xml index 17575711..f4279307 100644 --- a/app/src/main/res/drawable/error.xml +++ b/app/src/main/res/drawable/error.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/layout/fragment_camera.xml b/app/src/main/res/layout/fragment_camera.xml index d73bc355..92ac77d6 100644 --- a/app/src/main/res/layout/fragment_camera.xml +++ b/app/src/main/res/layout/fragment_camera.xml @@ -14,9 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + + + + + + + + + + + + + + + + + + + + + @@ -422,6 +433,14 @@ + + + + + + + + @@ -430,6 +449,14 @@ + + + + + + + + @@ -438,6 +465,14 @@ + + + + + + + + @@ -449,6 +484,17 @@ + + + + + + + + + + + @@ -460,6 +506,17 @@ + + + + + + + + + + + @@ -471,6 +528,17 @@ + + + + + + + + + + + @@ -1692,6 +1760,14 @@ + + + + + + + + @@ -1700,6 +1776,14 @@ + + + + + + + + @@ -1708,6 +1792,14 @@ + + + + + + + + @@ -1716,6 +1808,14 @@ + + + + + + + + @@ -1724,6 +1824,14 @@ + + + + + + + + @@ -1748,6 +1856,14 @@ + + + + + + + + @@ -1756,6 +1872,14 @@ + + + + + + + + @@ -1764,6 +1888,14 @@ + + + + + + + + @@ -1772,6 +1904,14 @@ + + + + + + + + @@ -1780,6 +1920,14 @@ + + + + + + + + @@ -1788,6 +1936,14 @@ + + + + + + + + @@ -1796,6 +1952,14 @@ + + + + + + + + @@ -1804,6 +1968,14 @@ + + + + + + + + @@ -1812,6 +1984,14 @@ + + + + + + + + @@ -1820,6 +2000,14 @@ + + + + + + + + @@ -1828,6 +2016,14 @@ + + + + + + + + @@ -1836,6 +2032,14 @@ + + + + + + + + @@ -1844,6 +2048,14 @@ + + + + + + + + @@ -1852,6 +2064,14 @@ + + + + + + + + @@ -1860,6 +2080,14 @@ + + + + + + + + @@ -1868,6 +2096,14 @@ + + + + + + + + @@ -1876,6 +2112,14 @@ + + + + + + + + @@ -1892,6 +2136,14 @@ + + + + + + + + @@ -1900,6 +2152,14 @@ + + + + + + + + @@ -1908,6 +2168,14 @@ + + + + + + + + @@ -1916,6 +2184,14 @@ + + + + + + + + @@ -1948,6 +2224,14 @@ + + + + + + + + @@ -1956,6 +2240,14 @@ + + + + + + + + @@ -1964,6 +2256,14 @@ + + + + + + + + @@ -1972,6 +2272,14 @@ + + + + + + + + @@ -1980,6 +2288,14 @@ + + + + + + + + @@ -1988,6 +2304,14 @@ + + + + + + + + @@ -1996,6 +2320,14 @@ + + + + + + + + @@ -2004,6 +2336,14 @@ + + + + + + + + @@ -2012,6 +2352,14 @@ + + + + + + + + @@ -2020,6 +2368,14 @@ + + + + + + + + @@ -2028,6 +2384,14 @@ + + + + + + + + @@ -2036,6 +2400,14 @@ + + + + + + + + @@ -2044,6 +2416,14 @@ + + + + + + + + @@ -2052,6 +2432,14 @@ + + + + + + + + @@ -2060,6 +2448,14 @@ + + + + + + + + @@ -2068,6 +2464,14 @@ + + + + + + + + @@ -2076,6 +2480,14 @@ + + + + + + + + @@ -2084,6 +2496,14 @@ + + + + + + + + @@ -2130,6 +2550,11 @@ + + + + + @@ -2476,6 +2901,14 @@ + + + + + + + + @@ -2484,6 +2917,14 @@ + + + + + + + + @@ -2516,6 +2957,14 @@ + + + + + + + + @@ -2826,6 +3275,14 @@ + + + + + + + + @@ -2834,6 +3291,14 @@ + + + + + + + + @@ -2845,6 +3310,17 @@ + + + + + + + + + + + @@ -3405,6 +3881,17 @@ + + + + + + + + + + + @@ -4500,6 +4987,14 @@ + + + + + + + + @@ -4529,11 +5024,24 @@ + + + + + + + + + + + + + @@ -4558,6 +5066,14 @@ + + + + + + + + @@ -4592,6 +5108,14 @@ + + + + + + + + @@ -4666,6 +5190,11 @@ + + + + + @@ -4737,6 +5266,14 @@ + + + + + + + + @@ -4745,17 +5282,34 @@ + + + + + + + + + + + + + + + + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e80aa6de..570637ad 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ #Fri Oct 14 13:37:44 GMT 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=c01b46042141d23aea23ae5b09a12410a7996bac8c7fdf367547acd1b3c772d9 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-rc-5-bin.zip +distributionSha256Sum=1b6b558be93f29438d3df94b7dfee02e794b94d9aca4611a92cdb79b6b88e909 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists