Skip to content

Commit

Permalink
add config file
Browse files Browse the repository at this point in the history
update submodule
  • Loading branch information
chinosk6 committed Jun 25, 2024
1 parent a88e1f1 commit 563754d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/main/assets/gakumas-local
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ package io.github.chinosk.gakumas.localify.hookUtils

import android.app.Activity
import android.net.Uri
import android.os.Build
import android.util.Log
import io.github.chinosk.gakumas.localify.GakumasHookMain
import io.github.chinosk.gakumas.localify.TAG
import java.io.BufferedReader
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.InputStream
import java.io.InputStreamReader
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream

object FileHotUpdater {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.github.chinosk.gakumas.localify.models


data class ProgramConfig (
var checkBuiltInAssets: Boolean = true,
var transRemoteZipUrl: String = "",
var useRemoteAssets: Boolean = true,
var delRemoteAfterUpdate: Boolean = true,
var cleanLocalAssets: Boolean = false,

var p: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ package io.github.chinosk.gakumas.localify.ui.pages.subPages

import GakuGroupBox
import android.content.res.Configuration.UI_MODE_NIGHT_NO
import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
Expand All @@ -20,11 +18,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
Expand All @@ -38,7 +32,6 @@ import androidx.compose.ui.unit.sp
import androidx.lifecycle.viewmodel.compose.viewModel
import io.github.chinosk.gakumas.localify.MainActivity
import io.github.chinosk.gakumas.localify.R
import io.github.chinosk.gakumas.localify.TAG
import io.github.chinosk.gakumas.localify.getConfigState
import io.github.chinosk.gakumas.localify.getProgramConfigState
import io.github.chinosk.gakumas.localify.getProgramDownloadAbleState
Expand Down Expand Up @@ -197,6 +190,7 @@ fun HomePage(modifier: Modifier = Modifier,
onDownload = { progress, _, _ ->
context?.mainPageAssetsViewDataUpdate(downloadProgressState = progress)
},

onSuccess = { byteArray ->
context?.mainPageAssetsViewDataUpdate(
downloadAbleState = true,
Expand All @@ -219,8 +213,8 @@ fun HomePage(modifier: Modifier = Modifier,
errorString = context.getString(R.string.invalid_zip_file_warn)
)
}

},

onFailed = { code, reason ->
context?.mainPageAssetsViewDataUpdate(
downloadAbleState = true,
Expand Down

0 comments on commit 563754d

Please sign in to comment.