Skip to content

Commit c4b0fc8

Browse files
Correctly count extensions at the SplashScreen,
Fixed wrong path for an tv build, Removed unused libraries Signed-off-by: MrBoom <[email protected]>
1 parent 89a85a2 commit c4b0fc8

File tree

8 files changed

+22
-61
lines changed

8 files changed

+22
-61
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: ./gradlew assemble${{ inputs.channel }}TvRelease -Pbuildkonfig.flavor=${{ inputs.channel }}
4949

5050
# - name: Build Exe
51-
# id: build_alpha_exe
51+
# id: build_exe
5252
# run: ./gradlew packageExe -Pbuildkonfig.flavor=${{ inputs.channel }}
5353

5454
- name: Sign Mobile Apk
@@ -95,4 +95,4 @@ jobs:
9595
with:
9696
name: "Tv Apk"
9797
retention-days: 90
98-
path: "app/build/outputs/apk/${{ inputs.channel }}Tv/tv/release/awery-tv-${{ inputs.channel }}.apk"
98+
path: "app/build/outputs/apk/${{ inputs.channel }}Tv/release/awery-tv-${{ inputs.channel }}.apk"

.github/workflows/publish_alpha.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,29 +112,29 @@ jobs:
112112
env:
113113
BUILD_TOOLS_VERSION: "34.0.0"
114114

115-
- name: Rename APK File
115+
- name: Rename Mobile Apk File
116116
run: |
117117
mv app/build/outputs/apk/alphaMobile/release/app-alpha-mobile-release-signed.apk app/build/outputs/apk/alphaMobile/release/awery-mobile-alpha.apk
118118
119-
- name: Rename Tv APK File
119+
- name: Rename Tv Apk File
120120
run: |
121121
mv app/build/outputs/apk/alphaTv/release/app-alpha-tv-release-signed.apk app/build/outputs/apk/alphaTv/release/awery-tv-alpha.apk
122122
123-
- name: Upload Alpha APK
123+
- name: Upload Mobile Apk
124124
uses: actions/upload-artifact@v4
125125
with:
126-
name: "Alpha APK"
126+
name: "Mobile Apk"
127127
retention-days: 90
128128
path: "app/build/outputs/apk/alphaMobile/release/awery-mobile-alpha.apk"
129129

130-
- name: Upload Tv Alpha APK
130+
- name: Upload Tv Apk
131131
uses: actions/upload-artifact@v4
132132
with:
133-
name: "Tv Alpha APK"
133+
name: "Tv Apk"
134134
retention-days: 90
135-
path: "app/build/outputs/apk/alphaTv/tv/release/awery-tv-alpha.apk"
135+
path: "app/build/outputs/apk/alphaTv/release/awery-tv-alpha.apk"
136136

137-
- name: Upload APK to Discord and Telegram
137+
- name: Upload Apk to Discord and Telegram
138138
shell: bash
139139
run: |
140140
fetch_user_details() {

app/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ kotlin {
6767
implementation(libs.androidx.appcompat)
6868
implementation(libs.androidx.splashscreen)
6969

70-
implementation(libs.androidx.recyclerview)
7170
implementation(libs.material)
7271
implementation(libs.bundles.exoplayer)
7372
implementation(libs.safeargsnext)

ext/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ kotlin {
1414
}
1515

1616
dependencies {
17-
// Coroutines
18-
api(libs.kotlinx.coroutines.core)
19-
20-
// Serialization
21-
implementation(libs.moshi)
22-
implementation(libs.moshi.kotlin)
17+
implementation(libs.kotlinx.coroutines.core)
2318
implementation(libs.kotlinx.serialization.json)
2419
}
2520

ext/src/main/kotlin/com/mrboomdev/awery/ext/data/CatalogFeed.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
package com.mrboomdev.awery.ext.data
22

3-
import com.squareup.moshi.Json
43
import java.io.Serializable
54

65
class CatalogFeed(
7-
@Json(name = "source_manager")
86
val managerId: String? = null,
9-
@Json(name = "source_id")
107
val sourceId: String? = null,
11-
@Json(name = "source_feed")
128
val feedId: String? = null,
139
val title: String,
1410
val style: Style = Style.UNSPECIFIED,
15-
@Json(name = "hide_if_empty")
1611
val hideIfEmpty: Boolean = false,
1712
val filters: List<Setting>? = null
1813
): Serializable {

gradle/libs.versions.toml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,15 @@ media3 = "1.5.1"
88
markwon = "4.6.2"
99
room = "2.7.0-beta01"
1010
coil = "3.0.4"
11-
12-
# For removal
13-
glide = "4.16.0"
14-
moshi = "1.15.2"
1511
okhttp = "5.0.0-alpha.14"
16-
bigimageviewer = "1.8.1"
17-
sonner = "0.3.8"
1812
voyager-navigator = "1.1.0-beta02"
1913

2014
[libraries]
2115
safeargsnext = { group = "ru.mrboomdev.safeargsnext", name = "safeargsnext", version = "1.0.1" }
2216
lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle-viewmodel-compose" }
2317
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.9.0" }
2418
balloon = { module = "com.github.skydoves:balloon", version = "1.6.11" }
25-
animatedbottombar = { module = "nl.joery.animatedbottombar:library", version = "1.1.0" }
26-
bigimageviewer = { module = "com.github.piasy:BigImageViewer", version.ref = "bigimageviewer" }
2719
ebook-reader = { module = "com.github.VipulOG:ebook-reader", version = "0.1.6" }
28-
pageindicatorview = { module = "com.github.emilaleborn:PageIndicatorView", version = "905cd4e2ab" }
29-
retrostreams = { module = "net.sourceforge.streamsupport:android-retrostreams", version = "1.7.4" }
3020

3121
# Android
3222
androidx-core = { group = "androidx.core", name = "core-ktx", version = "1.15.0" }
@@ -38,7 +28,7 @@ androidx-preference = { module = "androidx.preference:preference-ktx", version =
3828
androidx-webkit = { module = "androidx.webkit:webkit", version = "1.12.1" }
3929
material = { group = "com.google.android.material", name = "material", version = "1.12.0" }
4030
hauler = { module = "app.futured.hauler:hauler", version = "5.0.0" }
41-
sonner = { module = "io.github.dokar3:sonner", version.ref = "sonner" }
31+
sonner = { module = "io.github.dokar3:sonner", version = "0.3.8" }
4232
voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager-navigator" }
4333
voyager-screenmodel = { module = "cafe.adriel.voyager:voyager-screenmodel", version.ref = "voyager-navigator" }
4434
voyager-tab-navigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager-navigator" }
@@ -112,23 +102,6 @@ okhttp-dnsoverhttps = { module = "com.squareup.okhttp3:okhttp-dnsoverhttps", ver
112102
androidx-navigation = { group = "org.jetbrains.androidx.navigation", name = "navigation-compose", version = "2.8.0-alpha10"}
113103
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.8.7" }
114104

115-
# For removal (Use compose components instead)
116-
konfetti-xml = { module = "nl.dionsegijn:konfetti-xml", version = "2.0.5" }
117-
androidx-fragment = { module = "androidx.fragment:fragment-ktx", version = "1.8.6" }
118-
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version = "1.4.0" }
119-
androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version = "1.1.0" }
120-
121-
# For removal (Use coil instead)
122-
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
123-
glide-imageloader = { module = "com.github.piasy:GlideImageLoader", version.ref = "bigimageviewer" }
124-
glide-imageViewFactory = { module = "com.github.piasy:GlideImageViewFactory", version.ref = "bigimageviewer" }
125-
glide-okhttp3 = { module = "com.github.bumptech.glide:okhttp3-integration", version.ref = "glide" }
126-
127-
# For removal (Use kotlin serialization instead)
128-
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
129-
moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" }
130-
moshi-kotlin-codegen = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshi" }
131-
132105
[bundles]
133106
okhttp = ["okhttp", "okhttp-brotli", "okhttp-dnsoverhttps", "okhttp-logging"]
134107

shared/src/androidMain/kotlin/com/mrboomdev/awery/sources/yomi/tachiyomi/TachiyomiManager.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ class TachiyomiManager: YomiManager<Source>(
5252

5353
throw UnsupportedOperationException("Unsupported source type!")
5454
}
55-
56-
@Throws(IllegalArgumentException::class)
55+
5756
override fun createSourceWrapper(
5857
label: String,
5958
isNsfw: Boolean,

shared/src/commonMain/kotlin/com/mrboomdev/awery/sources/ExtensionsManager.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,34 +106,34 @@ object ExtensionsManager {
106106
override fun getAll(): List<AbstractSource> = managers.values.toList()
107107

108108
override fun onLoad(): PendingTask<Flow<Progress>> {
109-
var totalSize = 0L
109+
val progresses = mutableMapOf<SourcesManager, Progress>()
110110

111111
for(manager in createPlatformSourceManagers()) {
112112
managers[manager.context.id] = manager
113113
}
114114

115115
val pendingTasks = managers.values.map { manager ->
116116
val task = manager.onLoad()
117-
task.size?.let { totalSize += it }
117+
task.size?.let { progresses[manager] = Progress(it) }
118118
manager to task
119119
}
120120

121+
val progress = Progress(progresses.values.sumOf { it.max })
122+
121123
return object : PendingTask<Flow<Progress>>() {
122-
override val size = totalSize
124+
override val size = progress.max
123125

124126
override val data: Flow<Progress>
125127
get() = channelFlow {
126-
val progresses = mutableMapOf<SourcesManager, Long>()
127-
val progress = Progress(totalSize)
128-
129128
for((manager, task) in pendingTasks) {
130129
task.data.collectIndexed { index, it ->
130+
progresses[manager] = it
131+
131132
if(index == 0) {
132-
progress.max += it.max
133+
progress.max = progresses.values.sumOf { it.max }
133134
}
134135

135-
progresses[manager] = it.value
136-
progress.value = progresses.values.sum()
136+
progress.value = progresses.values.sumOf { it.value }
137137
send(progress)
138138
}
139139
}

0 commit comments

Comments
 (0)