Skip to content

Commit e156642

Browse files
committed
remove card content for now
1 parent c78c04a commit e156642

File tree

3 files changed

+20
-82
lines changed

3 files changed

+20
-82
lines changed

app/src/main/kotlin/com/aliucord/manager/ui/screens/home/HomeModel.kt

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import cafe.adriel.voyager.core.model.screenModelScope
1515
import com.aliucord.manager.BuildConfig
1616
import com.aliucord.manager.R
1717
import com.aliucord.manager.domain.repository.GithubRepository
18-
import com.aliucord.manager.installer.util.uninstallApk
19-
import com.aliucord.manager.manager.PreferencesManager
2018
import com.aliucord.manager.network.utils.fold
2119
import com.aliucord.manager.ui.util.DiscordVersion
2220
import com.aliucord.manager.util.launchBlock

app/src/main/kotlin/com/aliucord/manager/ui/screens/home/components/InstalledItemCard.kt

+19-79
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import androidx.compose.ui.res.stringResource
1515
import androidx.compose.ui.text.*
1616
import androidx.compose.ui.text.font.FontWeight
1717
import androidx.compose.ui.unit.dp
18-
import androidx.compose.ui.unit.sp
1918
import com.aliucord.manager.R
2019
import com.aliucord.manager.ui.components.SegmentedButton
2120
import com.aliucord.manager.ui.screens.home.InstallData
@@ -43,7 +42,7 @@ fun InstalledItemCard(
4342
)
4443
) {
4544
Column(
46-
verticalArrangement = Arrangement.spacedBy(14.dp),
45+
verticalArrangement = Arrangement.spacedBy(24.dp),
4746
modifier = Modifier.padding(20.dp),
4847
) {
4948
Row(
@@ -59,12 +58,24 @@ fun InstalledItemCard(
5958
.clip(CircleShape),
6059
)
6160

62-
Text(
63-
text = "\"${data.name}\"",
64-
fontWeight = FontWeight.SemiBold,
65-
style = LocalTextStyle.current.copy(fontSize = 18.sp),
66-
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = .94f),
67-
)
61+
Column {
62+
Text(
63+
text = "\"${data.name}\"",
64+
fontWeight = FontWeight.SemiBold,
65+
color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = .94f),
66+
)
67+
68+
Text(
69+
text = data.packageName,
70+
style = MaterialTheme.typography.bodySmall,
71+
color = MaterialTheme.colorScheme.onSurfaceVariant,
72+
modifier = Modifier
73+
.padding(start = 1.dp)
74+
.offset(y = (-2).dp)
75+
.alpha(.7f)
76+
.basicMarquee(),
77+
)
78+
}
6879

6980
Spacer(Modifier.weight(1f, fill = true))
7081

@@ -88,77 +99,6 @@ fun InstalledItemCard(
8899
}
89100
}
90101

91-
FlowRow(
92-
maxItemsInEachRow = 2,
93-
// horizontalArrangement = Arrangement.spacedBy(10.dp),
94-
horizontalArrangement = Arrangement.SpaceAround,
95-
verticalArrangement = Arrangement.spacedBy(4.dp),
96-
modifier = Modifier
97-
.fillMaxWidth()
98-
.padding(horizontal = 4.dp),
99-
) {
100-
Column(
101-
verticalArrangement = Arrangement.spacedBy(2.dp),
102-
horizontalAlignment = Alignment.CenterHorizontally,
103-
) {
104-
Text(
105-
text = "Account:",
106-
style = MaterialTheme.typography.bodyMedium,
107-
color = MaterialTheme.colorScheme.onSurface,
108-
)
109-
Text(
110-
text = "rushii",
111-
style = MaterialTheme.typography.bodySmall,
112-
color = MaterialTheme.colorScheme.onSurfaceVariant,
113-
modifier = Modifier.basicMarquee(),
114-
)
115-
}
116-
117-
Column(
118-
verticalArrangement = Arrangement.spacedBy(2.dp),
119-
horizontalAlignment = Alignment.CenterHorizontally,
120-
) {
121-
Text(
122-
text = "Plugins:",
123-
style = MaterialTheme.typography.bodyMedium,
124-
color = MaterialTheme.colorScheme.onSurface,
125-
)
126-
Text(
127-
text = "129",
128-
style = MaterialTheme.typography.bodySmall,
129-
color = MaterialTheme.colorScheme.onSurfaceVariant,
130-
modifier = Modifier.basicMarquee(),
131-
)
132-
}
133-
134-
Column(
135-
verticalArrangement = Arrangement.spacedBy(2.dp),
136-
horizontalAlignment = Alignment.CenterHorizontally,
137-
) {
138-
Text(
139-
text = "Package name:",
140-
style = MaterialTheme.typography.bodyMedium,
141-
color = MaterialTheme.colorScheme.onSurface,
142-
)
143-
Text(
144-
text = data.packageName,
145-
style = MaterialTheme.typography.bodySmall,
146-
color = MaterialTheme.colorScheme.onSurfaceVariant,
147-
modifier = Modifier.basicMarquee(),
148-
)
149-
}
150-
// LabelTextItem(
151-
// label = stringResource(R.string.label_pkg_name),
152-
// value = data.packageName,
153-
// modifier = Modifier.basicMarquee(),
154-
// )
155-
//
156-
// LabelTextItem(
157-
// label = "Plugins:",
158-
// value = "Unknown",
159-
// )
160-
}
161-
162102
Row(
163103
horizontalArrangement = Arrangement.spacedBy(2.dp),
164104
modifier = Modifier.clip(MaterialTheme.shapes.large),

app/src/main/kotlin/com/aliucord/manager/util/Coroutines.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import kotlin.coroutines.CoroutineContext
1010
*/
1111
inline fun CoroutineScope.launchBlock(
1212
context: CoroutineContext = Dispatchers.Main,
13-
noinline block: suspend CoroutineScope.() -> Unit
13+
noinline block: suspend CoroutineScope.() -> Unit,
1414
) {
1515
launch(context, block = block)
1616
}

0 commit comments

Comments
 (0)