Skip to content

Commit

Permalink
fix: exception trying to parcel PatchClass on activity save
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe1st committed Aug 1, 2022
1 parent 2e1e632 commit 2b956af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
id("org.jetbrains.kotlin.android.extensions")
kotlin("plugin.serialization") version "1.7.10"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app.revanced.manager.ui.screens.mainsubscreens

import android.app.Application
import android.content.pm.PackageManager
import android.os.Parcelable
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -41,6 +42,7 @@ import app.revanced.patcher.util.patch.implementation.DexPatchBundle
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.annotation.RootNavGraph
import dalvik.system.DexClassLoader
import kotlinx.android.parcel.Parcelize
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -127,10 +129,11 @@ fun PatcherSubscreen(
}
}

@Parcelize
data class PatchClass(
val patch: Class<out Patch<Data>>,
val unsupported: Boolean,
)
) : Parcelable

class PatcherViewModel(val app: Application) : AndroidViewModel(app) {
private val bundleCacheDir = app.filesDir.resolve("bundle-cache").also { it.mkdirs() }
Expand Down

0 comments on commit 2b956af

Please sign in to comment.