Skip to content

Commit 25f48ce

Browse files
committed
Merge branch 'dev'
2 parents 51b2c16 + bbcc8ad commit 25f48ce

File tree

147 files changed

+4278
-2070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+4278
-2070
lines changed

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ android {
4343
minSdkVersion 26
4444
targetSdkVersion 36
4545
versionCode 130 // is updated automatically by BitRise; only used when building locally
46-
versionName '1.21.3'
46+
versionName '1.21.4'
4747

4848
def includeObjectBoxBrowser = System.getenv("INCLUDE_OBJECTBOX_BROWSER") ?: "false"
4949
def includeLeakCanary = System.getenv("INCLUDE_LEAK_CANARY") ?: "false"
@@ -192,7 +192,7 @@ dependencies {
192192
/**
193193
* UI
194194
*/
195-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
195+
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0'
196196

197197
// https://github.com/mikepenz/FastAdapter
198198
def fastadapter_version = '5.7.0'
@@ -259,7 +259,7 @@ dependencies {
259259
implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
260260

261261
// Download speed limit
262-
implementation 'com.bucket4j:bucket4j_jdk17-core:8.15.0'
262+
implementation 'com.bucket4j:bucket4j_jdk17-core:8.16.0'
263263

264264
// TLS v1.3 support for Android <= 9
265265
implementation 'org.conscrypt:conscrypt-android:2.5.3'
@@ -303,7 +303,7 @@ dependencies {
303303
implementation 'info.debatty:java-string-similarity:2.0.0'
304304

305305
// Biometrics
306-
implementation 'dev.skomlach:biometric:2.2.51'
306+
implementation 'dev.skomlach:biometric:2.3.4'
307307

308308
// Searchable prefs
309309
implementation 'com.github.ByteHamster:SearchPreference:2.7.3'
@@ -318,7 +318,7 @@ dependencies {
318318
* ANALYTICS
319319
*/
320320
// Import the BoM for the Firebase platform
321-
implementation platform('com.google.firebase:firebase-bom:34.4.0')
321+
implementation platform('com.google.firebase:firebase-bom:34.6.0')
322322

323323
// Crashlytics
324324
implementation 'com.google.firebase:firebase-crashlytics'

app/customssiv/src/main/java/me/devsaki/hentoid/customssiv/util/HttpHelper.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ internal class UriParts(uri: String, lowercase: Boolean = false) {
3535
val fragmentIndex = uriNoParams.lastIndexOf('#')
3636
if (fragmentIndex > -1) {
3737
fragment = uriNoParams.substring(fragmentIndex + 1)
38-
uriNoParams = uriNoParams.substring(0, fragmentIndex)
38+
uriNoParams = uriNoParams.take(fragmentIndex)
3939
} else fragment = ""
4040
val paramsIndex = uriNoParams.lastIndexOf('?')
4141
if (paramsIndex > -1) {
4242
query = uriNoParams.substring(paramsIndex + 1)
43-
uriNoParams = uriNoParams.substring(0, paramsIndex)
43+
uriNoParams = uriNoParams.take(paramsIndex)
4444
} else query = ""
4545
val pathIndex = uriNoParams.lastIndexOf('/')
46-
path = if (pathIndex > -1) uriNoParams.substring(0, pathIndex) else uriNoParams
46+
path = if (pathIndex > -1) uriNoParams.take(pathIndex) else uriNoParams
4747
val protocolEndIndex = path.indexOf("://")
4848
val hostEndIndex = path.indexOf("/", protocolEndIndex + 3)
4949
host = if (hostEndIndex > -1) path.substring(0, hostEndIndex) else path

app/gles-renderer/src/main/java/me/devsaki/hentoid/gles_renderer/GPUImageRenderer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class GPUImageRenderer(private var filter: GPUImageFilter) : GLSurfaceView.Rende
9595
private fun runAll(queue: Queue<Runnable>) {
9696
synchronized(queue) {
9797
while (!queue.isEmpty()) {
98-
queue.poll()!!.run()
98+
queue.poll()?.run()
9999
}
100100
}
101101
}

app/src/main/java/me/devsaki/hentoid/activities/LibraryActivity.kt

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import me.devsaki.hentoid.enums.Grouping
5151
import me.devsaki.hentoid.events.AppUpdatedEvent
5252
import me.devsaki.hentoid.events.CommunicationEvent
5353
import me.devsaki.hentoid.events.ProcessEvent
54-
import me.devsaki.hentoid.fragments.library.LibraryArchiveDialogFragment
54+
import me.devsaki.hentoid.fragments.library.LibraryExportDialogFragment
5555
import me.devsaki.hentoid.fragments.library.LibraryBottomSortFilterFragment
5656
import me.devsaki.hentoid.fragments.library.LibraryContentFragment
5757
import me.devsaki.hentoid.fragments.library.LibraryFoldersFragment
@@ -95,7 +95,7 @@ private const val BEHOLDER_DELAY_MS = 2 * 60 * 1000 // 2 min
9595
var hasChangedGridDisplay = false
9696
var hasClosedTopAlert = false
9797

98-
class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
98+
class LibraryActivity : BaseActivity(), LibraryExportDialogFragment.Parent {
9999

100100
// ======== COMMUNICATION
101101
// Viewmodel
@@ -141,12 +141,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
141141
private var resetReadStatsMenu: MenuItem? = null
142142
private var rateMenu: MenuItem? = null
143143
private var shareMenu: MenuItem? = null
144-
private var archiveMenu: MenuItem? = null
144+
private var exportMenu: MenuItem? = null
145145
private var changeGroupMenu: MenuItem? = null
146146
private var folderMenu: MenuItem? = null
147147
private var redownloadMenu: MenuItem? = null
148-
private var downloadStreamedMenu: MenuItem? = null
149-
private var streamMenu: MenuItem? = null
148+
private var storageMethodMenu: MenuItem? = null
150149
private var groupCoverMenu: MenuItem? = null
151150
private var mergeMenu: MenuItem? = null
152151
private var splitMenu: MenuItem? = null
@@ -297,6 +296,7 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
297296
if (!EventBus.getDefault().isRegistered(this)) EventBus.getDefault().register(this)
298297
}
299298

299+
@Suppress("unused")
300300
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
301301
fun onAppUpdated(event: AppUpdatedEvent) {
302302
EventBus.getDefault().removeStickyEvent(event)
@@ -850,12 +850,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
850850
resetReadStatsMenu = findItem(R.id.action_reset_read)
851851
rateMenu = findItem(R.id.action_rate)
852852
shareMenu = findItem(R.id.action_share)
853-
archiveMenu = findItem(R.id.action_archive)
853+
exportMenu = findItem(R.id.action_export)
854854
changeGroupMenu = findItem(R.id.action_change_group)
855855
folderMenu = findItem(R.id.action_open_folder)
856856
redownloadMenu = findItem(R.id.action_redownload)
857-
downloadStreamedMenu = findItem(R.id.action_download)
858-
streamMenu = findItem(R.id.action_stream)
857+
storageMethodMenu = findItem(R.id.action_storage_method)
859858
groupCoverMenu = findItem(R.id.action_set_group_cover)
860859
mergeMenu = findItem(R.id.action_merge)
861860
splitMenu = findItem(R.id.action_split)
@@ -1108,12 +1107,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11081107
completedMenu?.isVisible = false
11091108
resetReadStatsMenu?.isVisible = false
11101109
rateMenu?.isVisible = isMultipleSelection
1111-
archiveMenu?.isVisible = !hasProcessed
1110+
exportMenu?.isVisible = !hasProcessed
11121111
changeGroupMenu?.isVisible = false
11131112
folderMenu?.isVisible = false
11141113
redownloadMenu?.isVisible = false
1115-
downloadStreamedMenu?.isVisible = false
1116-
streamMenu?.isVisible = false
1114+
storageMethodMenu?.isVisible = false
11171115
groupCoverMenu?.isVisible = false
11181116
mergeMenu?.isVisible = false
11191117
splitMenu?.isVisible = false
@@ -1130,12 +1128,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11301128
completedMenu?.isVisible = false
11311129
resetReadStatsMenu?.isVisible = false
11321130
rateMenu?.isVisible = false
1133-
archiveMenu?.isVisible = false
1131+
exportMenu?.isVisible = false
11341132
changeGroupMenu?.isVisible = false
11351133
folderMenu?.isVisible = 1 == selectedTotalCount
11361134
redownloadMenu?.isVisible = false
1137-
downloadStreamedMenu?.isVisible = false
1138-
streamMenu?.isVisible = false
1135+
storageMethodMenu?.isVisible = false
11391136
groupCoverMenu?.isVisible = false
11401137
mergeMenu?.isVisible = false
11411138
splitMenu?.isVisible = false
@@ -1151,12 +1148,11 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
11511148
resetReadStatsMenu?.isVisible = true
11521149
rateMenu?.isVisible = isMultipleSelection
11531150
shareMenu?.isVisible = true
1154-
archiveMenu?.isVisible = !hasProcessed
1151+
exportMenu?.isVisible = !hasProcessed
11551152
changeGroupMenu?.isVisible = !hasProcessed
11561153
folderMenu?.isVisible = !isMultipleSelection
11571154
redownloadMenu?.isVisible = !hasProcessed && selectedDownloadedCount > 0
1158-
downloadStreamedMenu?.isVisible = !hasProcessed && selectedStreamedCount > 0
1159-
streamMenu?.isVisible = !hasProcessed && selectedDownloadedCount > 0
1155+
storageMethodMenu?.isVisible = !hasProcessed
11601156
groupCoverMenu?.isVisible =
11611157
!isMultipleSelection && Settings.getGroupingDisplayG() != Grouping.FLAT
11621158
// Can only merge downloaded, streamed or non-archive external content together
@@ -1204,15 +1200,17 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
12041200
}
12051201
}
12061202

1203+
@Suppress("unused")
12071204
@Subscribe(threadMode = ThreadMode.MAIN)
12081205
fun onProcessEvent(event: ProcessEvent) {
12091206
if (R.id.delete_service_delete == event.processId
12101207
&& ProcessEvent.Type.COMPLETE == event.eventType
12111208
) processDeleteEvent(event)
12121209
}
12131210

1211+
@Suppress("unused")
12141212
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
1215-
fun onProcesStickyEvent(event: ProcessEvent) {
1213+
fun onProcessStickyEvent(event: ProcessEvent) {
12161214
var canRemove = false
12171215
if (R.id.delete_service_delete == event.processId
12181216
&& ProcessEvent.Type.COMPLETE == event.eventType
@@ -1247,21 +1245,21 @@ class LibraryActivity : BaseActivity(), LibraryArchiveDialogFragment.Parent {
12471245
}
12481246

12491247
/**
1250-
* Display the yes/no dialog to make sure the user really wants to archive selected items
1248+
* Display the yes/no dialog to make sure the user really wants to export selected items
12511249
*
1252-
* @param items Items to be archived if the answer is yes
1250+
* @param items Items to be exported if the answer is yes
12531251
*/
1254-
fun askArchiveItems(items: List<Content>, selectExtension: SelectExtension<*>) {
1252+
fun askExportItems(items: List<Content>, selectExtension: SelectExtension<*>) {
12551253
if (items.size > 1000) {
1256-
snack(R.string.archive_limit)
1254+
snack(R.string.process_limit)
12571255
return
12581256
}
12591257
if (items.isEmpty()) {
12601258
snack(R.string.invalid_selection_generic)
12611259
return
12621260
}
12631261
selectExtension.deselect(selectExtension.selections.toMutableSet())
1264-
LibraryArchiveDialogFragment.invoke(this, items)
1262+
LibraryExportDialogFragment.invoke(this, items)
12651263
}
12661264

12671265
override fun leaveSelectionMode() {

app/src/main/java/me/devsaki/hentoid/activities/settings/SettingsActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ class SettingsActivity : BaseActivity(), SearchPreferenceResultListener {
9999
}
100100

101101
override fun onSearchResultClicked(result: SearchPreferenceResult) {
102-
if (result.screen != null)
102+
if (result.screen != null) {
103103
fragment = fragment.navigateToScreen(supportFragmentManager, result.screen)
104-
fragment.view?.fitsSystemWindows = true
104+
fragment.view?.fitsSystemWindows = true
105+
}
106+
result.closeSearchPage(this)
105107
result.highlight(fragment)
106108
}
107109
}

0 commit comments

Comments
 (0)