forked from MeloNX/MeloNX
android - fix settings app action buttons. fix dlc manager add button missing
This commit is contained in:
parent
ec654e7a02
commit
cc8d44139a
@ -40,7 +40,7 @@ class DlcViewModel(val titleId: String) {
|
||||
val path = file.getAbsolutePath(storageHelper.storage.context)
|
||||
if (path.isNotEmpty()) {
|
||||
data?.apply {
|
||||
var contents = RyujinxNative.instance.deviceGetDlcContentList(
|
||||
val contents = RyujinxNative.instance.deviceGetDlcContentList(
|
||||
NativeHelpers.instance.storeStringJava(path),
|
||||
titleId.toLong(16)
|
||||
)
|
||||
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.wrapContentWidth
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material.icons.filled.Delete
|
||||
import androidx.compose.material3.Checkbox
|
||||
import androidx.compose.material3.Icon
|
||||
@ -51,25 +50,13 @@ class DlcViews {
|
||||
|
||||
Column(modifier = Modifier.padding(16.dp)) {
|
||||
Column {
|
||||
Row(modifier = Modifier.padding(8.dp)
|
||||
Row(modifier = Modifier
|
||||
.padding(8.dp)
|
||||
.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.SpaceBetween) {
|
||||
Text(text = "DLC for ${name}", textAlign = TextAlign.Center, modifier = Modifier.align(
|
||||
Alignment.CenterVertically
|
||||
))
|
||||
IconButton(
|
||||
onClick = {
|
||||
viewModel.add(refresh)
|
||||
},
|
||||
modifier = Modifier.align(
|
||||
Alignment.CenterVertically
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
Icons.Filled.Add,
|
||||
contentDescription = "Add"
|
||||
)
|
||||
}
|
||||
}
|
||||
Surface(
|
||||
modifier = Modifier
|
||||
@ -119,16 +106,27 @@ class DlcViews {
|
||||
|
||||
}
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
TextButton(
|
||||
modifier = Modifier.align(Alignment.End),
|
||||
onClick = {
|
||||
openDialog.value = false
|
||||
viewModel.save(dlcList)
|
||||
},
|
||||
) {
|
||||
Text("Save")
|
||||
Row(modifier = Modifier.align(Alignment.End)) {
|
||||
TextButton(
|
||||
modifier = Modifier.padding(4.dp),
|
||||
onClick = {
|
||||
viewModel.add(refresh)
|
||||
}
|
||||
) {
|
||||
|
||||
Text("Add")
|
||||
}
|
||||
TextButton(
|
||||
modifier = Modifier.padding(4.dp),
|
||||
onClick = {
|
||||
openDialog.value = false
|
||||
viewModel.save(dlcList)
|
||||
},
|
||||
) {
|
||||
Text("Save")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ import androidx.compose.animation.shrinkVertically
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@ -71,7 +73,7 @@ class SettingViews {
|
||||
const val EXPANSTION_TRANSITION_DURATION = 450
|
||||
const val IMPORT_CODE = 12341
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
fun Main(settingsViewModel: SettingsViewModel, mainViewModel: MainViewModel) {
|
||||
val loaded = remember {
|
||||
@ -239,7 +241,7 @@ class SettingViews {
|
||||
)
|
||||
}
|
||||
|
||||
Row(
|
||||
FlowRow(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(8.dp),
|
||||
|
Loading…
x
Reference in New Issue
Block a user