mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 04:58:56 +01:00
Clean up storage usage info
- Show bar representation of used/total space - Handle all mounted storages - Also included a bunch of unrelated immutables changes, sorry
This commit is contained in:
@@ -14,7 +14,6 @@ import okio.buffer
|
||||
import okio.sink
|
||||
import tachiyomi.core.util.system.logcat
|
||||
import tachiyomi.domain.chapter.model.Chapter
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
@@ -26,9 +25,10 @@ import java.io.IOException
|
||||
*
|
||||
* @param context the application context.
|
||||
*/
|
||||
class ChapterCache(private val context: Context) {
|
||||
|
||||
private val json: Json by injectLazy()
|
||||
class ChapterCache(
|
||||
private val context: Context,
|
||||
private val json: Json,
|
||||
) {
|
||||
|
||||
/** Cache class used for cache management. */
|
||||
private val diskCache = DiskLruCache.open(
|
||||
|
||||
@@ -111,7 +111,7 @@ class AppModule(val app: Application) : InjektModule {
|
||||
ProtoBuf
|
||||
}
|
||||
|
||||
addSingletonFactory { ChapterCache(app) }
|
||||
addSingletonFactory { ChapterCache(app, get()) }
|
||||
addSingletonFactory { CoverCache(app) }
|
||||
|
||||
addSingletonFactory { NetworkHelper(app, get()) }
|
||||
|
||||
Reference in New Issue
Block a user