fix: Updater & Friend Tracker
This commit is contained in:
@@ -206,4 +206,3 @@ properties["debug_flavor"]?.let {
|
||||
exclude(group = "androidx.profileinstaller", "profileinstaller")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
@@ -1,6 +1,9 @@
|
||||
-dontwarn de.robv.android.xposed.**
|
||||
-dontwarn org.mozilla.javascript.**
|
||||
|
||||
-keep class com.tonyodev.fetch2.** { *; }
|
||||
-keep class com.tonyodev.fetch2core.** { *; }
|
||||
|
||||
-keep enum * { *; }
|
||||
|
||||
-keep class com.android.tools.smali.dexlib2.** { *; }
|
||||
|
||||
@@ -15,15 +15,6 @@ import java.io.FileOutputStream
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
object UpdateDownloader {
|
||||
enum class DownloadState {
|
||||
IDLE,
|
||||
DOWNLOADING,
|
||||
COMPLETED,
|
||||
FAILED
|
||||
}
|
||||
|
||||
val downloadState = MutableStateFlow(DownloadState.IDLE)
|
||||
val downloadProgress = MutableStateFlow(0f)
|
||||
private var fetch: Fetch? = null
|
||||
private var listener: FetchListener? = null
|
||||
|
||||
@@ -42,6 +33,16 @@ object UpdateDownloader {
|
||||
}
|
||||
return fetch!!
|
||||
}
|
||||
enum class DownloadState {
|
||||
IDLE,
|
||||
DOWNLOADING,
|
||||
COMPLETED,
|
||||
FAILED
|
||||
}
|
||||
|
||||
val downloadState = MutableStateFlow(DownloadState.IDLE)
|
||||
val downloadProgress = MutableStateFlow(0f)
|
||||
|
||||
|
||||
private fun unzip(zipFile: File, targetDirectory: File) {
|
||||
ZipInputStream(zipFile.inputStream()).use { zis ->
|
||||
|
||||
@@ -189,7 +189,7 @@ fun ScriptCatalog(root: ScriptingRootSection) {
|
||||
color = MaterialTheme.colorScheme.primary,
|
||||
modifier = Modifier.clickable {
|
||||
context.androidContext.openLink(
|
||||
"https://github.com/rhunk/SnapEnhance/blob/dev/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/pages/scripting/ScriptRepos.md"
|
||||
"https://github.com/particle-box/PurrfectSnap/blob/main/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/pages/scripting/ScriptRepos.md"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -111,8 +111,7 @@ class EditRule : Routes.Route() {
|
||||
Card {
|
||||
Column(
|
||||
Modifier
|
||||
.padding(16.dp)
|
||||
.width(IntrinsicSize.Max)) {
|
||||
.padding(16.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Text("Add Event", style = MaterialTheme.typography.titleLarge, modifier = Modifier.weight(1f))
|
||||
IconButton(onClick = onDismissRequest) {
|
||||
@@ -120,23 +119,16 @@ class EditRule : Routes.Route() {
|
||||
}
|
||||
}
|
||||
Spacer(Modifier.height(16.dp))
|
||||
ExposedDropdownMenuBox(
|
||||
expanded = expanded.value,
|
||||
onExpandedChange = { expanded.value = !expanded.value },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
OutlinedTextField(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
value = context.translation["tracker_events.${currentEventType.value}"],
|
||||
onValueChange = {},
|
||||
readOnly = true,
|
||||
label = { Text("Event type") },
|
||||
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded.value) },
|
||||
)
|
||||
ExposedDropdownMenu(
|
||||
Column {
|
||||
OutlinedButton(
|
||||
onClick = { expanded.value = true },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
Text(context.translation["tracker_events.${currentEventType.value}"])
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = expanded.value,
|
||||
onDismissRequest = { expanded.value = false },
|
||||
modifier = Modifier.width(IntrinsicSize.Max)
|
||||
onDismissRequest = { expanded.value = false }
|
||||
) {
|
||||
TrackerEventType.entries.forEach { eventType ->
|
||||
DropdownMenuItem(
|
||||
|
||||
Reference in New Issue
Block a user