mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	Address some Kotlin language warnings
This commit is contained in:
		@@ -84,9 +84,9 @@ class LocalSource(private val context: Context) : CatalogueSource {
 | 
			
		||||
        when (state?.index) {
 | 
			
		||||
            0 -> {
 | 
			
		||||
                mangaDirs = if (state.ascending) {
 | 
			
		||||
                    mangaDirs.sortedBy { it.name.toLowerCase(Locale.ENGLISH) }
 | 
			
		||||
                    mangaDirs.sortedBy { it.name.lowercase(Locale.ENGLISH) }
 | 
			
		||||
                } else {
 | 
			
		||||
                    mangaDirs.sortedByDescending { it.name.toLowerCase(Locale.ENGLISH) }
 | 
			
		||||
                    mangaDirs.sortedByDescending { it.name.lowercase(Locale.ENGLISH) }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            1 -> {
 | 
			
		||||
@@ -238,7 +238,7 @@ class LocalSource(private val context: Context) : CatalogueSource {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private fun isSupportedFile(extension: String): Boolean {
 | 
			
		||||
        return extension.toLowerCase(Locale.ROOT) in SUPPORTED_ARCHIVE_TYPES
 | 
			
		||||
        return extension.lowercase() in SUPPORTED_ARCHIVE_TYPES
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fun getFormat(chapter: SChapter): Format {
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@ abstract class HttpSource : CatalogueSource {
 | 
			
		||||
     * Note the generated id sets the sign bit to 0.
 | 
			
		||||
     */
 | 
			
		||||
    override val id by lazy {
 | 
			
		||||
        val key = "${name.toLowerCase()}/$lang/$versionId"
 | 
			
		||||
        val key = "${name.lowercase()}/$lang/$versionId"
 | 
			
		||||
        val bytes = MessageDigest.getInstance("MD5").digest(key.toByteArray())
 | 
			
		||||
        (0..7).map { bytes[it].toLong() and 0xff shl 8 * (7 - it) }.reduce(Long::or) and Long.MAX_VALUE
 | 
			
		||||
    }
 | 
			
		||||
@@ -80,7 +80,7 @@ abstract class HttpSource : CatalogueSource {
 | 
			
		||||
    /**
 | 
			
		||||
     * Visible name of the source.
 | 
			
		||||
     */
 | 
			
		||||
    override fun toString() = "$name (${lang.toUpperCase()})"
 | 
			
		||||
    override fun toString() = "$name (${lang.uppercase()})"
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns an observable containing a page with a list of manga. Normally it's not needed to
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user