From e31eade57a9868d0a8084bdf957c1b80cbfcf172 Mon Sep 17 00:00:00 2001 From: huangx Date: Wed, 13 Mar 2024 18:02:23 +0800 Subject: [PATCH] fix bug --- app/build.gradle | 6 +++--- build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 6 +++--- library/build.gradle | 4 ++-- library/gradle.properties | 2 +- .../java/cn/hx/prioritydialog/PriorityDialogManager.java | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5fbdf5d..d1a79a6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,13 +4,13 @@ plugins { } android { - compileSdk 33 + compileSdk 34 namespace 'cn.hx.dialogmanager' defaultConfig { applicationId "cn.hx.dialogmanager" minSdk 14 - targetSdk 33 + targetSdk 34 versionCode 1 versionName "1.0" @@ -53,7 +53,7 @@ dependencies { implementation project(path: ':library') testImplementation 'junit:junit:4.13.2' testImplementation 'androidx.test.ext:junit:1.1.5' - testImplementation "org.robolectric:robolectric:4.10.3" + testImplementation "org.robolectric:robolectric:4.11.1" testImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' diff --git a/build.gradle b/build.gradle index 8ad24c0..5c07c73 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.4.2' apply false - id 'com.android.library' version '7.4.2' apply false - id 'org.jetbrains.kotlin.android' version '1.8.10' apply false + id 'com.android.application' version '8.3.0' apply false + id 'com.android.library' version '8.3.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.23' apply false id 'com.vanniktech.maven.publish' version '0.25.3' apply false } tasks.register('clean', Delete) { - delete rootProject.buildDir + delete rootProject.layout.buildDirectory } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 93beeac..1250cf9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Apr 04 10:25:50 CST 2022 -distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip -distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME +networkTimeout=10000 +validateDistributionUrl=true diff --git a/library/build.gradle b/library/build.gradle index ef37b6a..db07d16 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -4,12 +4,12 @@ plugins { } android { - compileSdk 33 + compileSdk 34 namespace 'cn.hx.prioritydialog' defaultConfig { minSdk 14 - targetSdk 33 + targetSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" diff --git a/library/gradle.properties b/library/gradle.properties index 6dcb8eb..5423638 100644 --- a/library/gradle.properties +++ b/library/gradle.properties @@ -1,6 +1,6 @@ #project GROUP=com.github.qq549631030 -VERSION_NAME=1.2.4 +VERSION_NAME=1.2.5 POM_ARTIFACT_ID=priority-dialog POM_NAME=PriorityDialog diff --git a/library/src/main/java/cn/hx/prioritydialog/PriorityDialogManager.java b/library/src/main/java/cn/hx/prioritydialog/PriorityDialogManager.java index f5d184b..a0d6bb6 100644 --- a/library/src/main/java/cn/hx/prioritydialog/PriorityDialogManager.java +++ b/library/src/main/java/cn/hx/prioritydialog/PriorityDialogManager.java @@ -161,7 +161,7 @@ public void onFragmentCreated(@NonNull FragmentManager fm, @NonNull Fragment f, } dialogHost.getPriorityDialogHostDelegate().init(PriorityDialogManager.this, f.requireFragmentManager(), f.getChildFragmentManager(), savedInstanceState); - if (savedInstanceState == null) { + if (savedInstanceState == null && !f.isStateSaved()) { Bundle arguments = f.getArguments(); if (arguments == null) { arguments = new Bundle();