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