From 90dfc84119fa16926ca9915c150349761227915f Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sat, 1 Jul 2023 12:54:44 +0300 Subject: [PATCH 1/3] Update dependencies --- app/build.gradle | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 547d8a120..5895a5099 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,9 +14,11 @@ android { defaultConfig { applicationId 'org.koitharu.kotatsu' minSdkVersion 21 + //TODO: update as soon as sources becomes available + //noinspection OldTargetApi targetSdkVersion 33 - versionCode 559 - versionName '5.3.2' + versionCode 560 + versionName '5.3.3' generatedDensities = [] testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -79,12 +81,12 @@ afterEvaluate { } dependencies { //noinspection GradleDependency - implementation('com.github.KotatsuApp:kotatsu-parsers:92bfc7e9fa') { + implementation('com.github.KotatsuApp:kotatsu-parsers:07df5a81cf') { exclude group: 'org.json', module: 'json' } implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.2' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.core:core-ktx:1.10.1' @@ -107,7 +109,7 @@ dependencies { // TODO https://issuetracker.google.com/issues/254846063 implementation 'androidx.work:work-runtime-ktx:2.8.1' //noinspection GradleDependency - implementation('com.google.guava:guava:32.0.0-android') { + implementation('com.google.guava:guava:32.0.1-android') { exclude group: 'com.google.guava', module: 'failureaccess' exclude group: 'org.checkerframework', module: 'checker-qual' exclude group: 'com.google.j2objc', module: 'j2objc-annotations' @@ -139,18 +141,18 @@ dependencies { implementation 'ch.acra:acra-http:5.10.1' implementation 'ch.acra:acra-dialog:5.10.1' - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.11' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12' testImplementation 'junit:junit:4.13.2' testImplementation 'org.json:json:20230618' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1' + testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.2' androidTestImplementation 'androidx.test:runner:1.5.2' androidTestImplementation 'androidx.test:rules:1.5.0' androidTestImplementation 'androidx.test:core-ktx:1.5.0' androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5' - androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1' + androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.2' androidTestImplementation 'androidx.room:room-testing:2.5.2' androidTestImplementation 'com.squareup.moshi:moshi-kotlin:1.15.0' From 98b8aa3f2dcca27d5148d9c84cad8ebaa6f249a0 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sat, 1 Jul 2023 14:46:42 +0300 Subject: [PATCH 2/3] Update details fragment layout --- .../kotatsu/details/ui/DetailsFragment.kt | 10 +- .../details/ui/scrobbling/ScrobblingInfoAD.kt | 4 +- .../layout-w600dp-land/fragment_details.xml | 223 ------------------ app/src/main/res/layout/fragment_details.xml | 125 +++++++--- .../main/res/layout/item_header_button.xml | 2 +- app/src/main/res/layout/item_list_group.xml | 2 +- .../main/res/layout/item_scrobbling_info.xml | 79 ++++--- app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/styles.xml | 4 + 9 files changed, 163 insertions(+), 287 deletions(-) delete mode 100644 app/src/main/res/layout-w600dp-land/fragment_details.xml diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DetailsFragment.kt b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DetailsFragment.kt index 8272c3b2e..b98d8180b 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DetailsFragment.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DetailsFragment.kt @@ -52,6 +52,7 @@ import org.koitharu.kotatsu.parsers.model.MangaState import org.koitharu.kotatsu.parsers.model.MangaTag import org.koitharu.kotatsu.reader.ui.ReaderActivity import org.koitharu.kotatsu.scrobbling.common.domain.model.ScrobblingInfo +import org.koitharu.kotatsu.scrobbling.common.ui.selector.ScrobblingSelectorSheet import org.koitharu.kotatsu.search.ui.MangaListActivity import org.koitharu.kotatsu.search.ui.SearchActivity import javax.inject.Inject @@ -80,6 +81,9 @@ class DetailsFragment : super.onViewBindingCreated(binding, savedInstanceState) binding.textViewAuthor.setOnClickListener(this) binding.imageViewCover.setOnClickListener(this) + binding.buttonDescriptionMore.setOnClickListener(this) + binding.buttonBookmarksMore.setOnClickListener(this) + binding.buttonScrobblingMore.setOnClickListener(this) binding.infoLayout.textViewSource.setOnClickListener(this) binding.textViewDescription.movementMethod = LinkMovementMethod.getInstance() binding.chipsTags.onChipClickListener = this @@ -217,7 +221,7 @@ class DetailsFragment : private fun onScrobblingInfoChanged(scrobblings: List) { var adapter = requireViewBinding().recyclerViewScrobbling.adapter as? ScrollingInfoAdapter - requireViewBinding().recyclerViewScrobbling.isGone = scrobblings.isEmpty() + requireViewBinding().groupScrobbling.isGone = scrobblings.isEmpty() if (adapter != null) { adapter.items = scrobblings } else { @@ -260,6 +264,10 @@ class DetailsFragment : scaleUpActivityOptionsOf(v), ) } + + R.id.button_scrobbling_more -> { + ScrobblingSelectorSheet.show(parentFragmentManager, manga, null) + } } } diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/scrobbling/ScrobblingInfoAD.kt b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/scrobbling/ScrobblingInfoAD.kt index 42644501a..1447002d3 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/scrobbling/ScrobblingInfoAD.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/scrobbling/ScrobblingInfoAD.kt @@ -29,8 +29,8 @@ fun scrobblingInfoAD( error(R.drawable.ic_error_placeholder) enqueueWith(coil) } - binding.textViewTitle.text = item.title - binding.textViewTitle.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, item.scrobbler.iconResId, 0) + binding.textViewTitle.setText(item.scrobbler.titleResId) + binding.imageViewIcon.setImageResource(item.scrobbler.iconResId) binding.ratingBar.rating = item.rating * binding.ratingBar.numStars binding.textViewStatus.text = item.status?.let { context.resources.getStringArray(R.array.scrobbling_statuses).getOrNull(it.ordinal) diff --git a/app/src/main/res/layout-w600dp-land/fragment_details.xml b/app/src/main/res/layout-w600dp-land/fragment_details.xml deleted file mode 100644 index 19d7974ea..000000000 --- a/app/src/main/res/layout-w600dp-land/fragment_details.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_details.xml b/app/src/main/res/layout/fragment_details.xml index 4f32dbd71..66e41f044 100644 --- a/app/src/main/res/layout/fragment_details.xml +++ b/app/src/main/res/layout/fragment_details.xml @@ -139,25 +139,79 @@ app:layout_constraintTop_toBottomOf="@+id/info_layout" /> + +