Skip to content

Commit

Permalink
Drop hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
xb2016 committed Sep 1, 2024
1 parent 8536049 commit eb7053c
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 930 deletions.
13 changes: 1 addition & 12 deletions app/src/main/java/com/hippo/ehviewer/EhApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.hippo.ehviewer

import android.app.Activity
import android.content.ComponentCallbacks2
import android.text.Html
import android.text.method.LinkMovementMethod
import android.view.View
Expand All @@ -29,7 +28,6 @@ import coil.ImageLoaderFactory
import coil.disk.DiskCache
import coil.util.DebugLogger
import com.hippo.ehviewer.client.EhCookieStore
import com.hippo.ehviewer.client.EhDns
import com.hippo.ehviewer.client.EhEngine
import com.hippo.ehviewer.client.EhTagDatabase
import com.hippo.ehviewer.client.data.GalleryDetail
Expand Down Expand Up @@ -165,13 +163,6 @@ class EhApplication : SceneApplication(), ImageLoaderFactory {
}
}

override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
if (level >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW) {
galleryDetailCache.evictAll()
}
}

fun putGlobalStuff(o: Any): Int {
val id = mIdGenerator.nextId()
mGlobalStuffMap[id] = o
Expand Down Expand Up @@ -220,11 +211,11 @@ class EhApplication : SceneApplication(), ImageLoaderFactory {
val nonCacheOkHttpClient by lazy {
OkHttpClient.Builder().apply {
cookieJar(EhCookieStore)
dns(EhDns)
proxySelector(ehProxySelector)
addInterceptor(CloudflareInterceptor(application))
}.build()
}

val noRedirectOkHttpClient by lazy {
nonCacheOkHttpClient.newBuilder()
.followRedirects(false)
Expand All @@ -246,8 +237,6 @@ class EhApplication : SceneApplication(), ImageLoaderFactory {
}
}

val hosts by lazy { Hosts(application, "hosts.db") }

val favouriteStatusRouter by lazy { FavouriteStatusRouter() }

val ehDatabase by lazy { buildMainDB(application) }
Expand Down
342 changes: 0 additions & 342 deletions app/src/main/java/com/hippo/ehviewer/Hosts.java

This file was deleted.

Loading

0 comments on commit eb7053c

Please sign in to comment.