Skip to content

Commit 0ac34ff

Browse files
authored
Merge pull request #4670 from nightscout/medtronic
MDT: compose migration
2 parents 720c5c4 + 060ec9d commit 0ac34ff

40 files changed

Lines changed: 1195 additions & 2769 deletions

File tree

PLAN.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

core/keys/src/main/kotlin/app/aaps/core/keys/IntentKey.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import app.aaps.core.keys.interfaces.IntentPreferenceKey
99
* - XdripIntentKey in :plugins:sync
1010
* - SmsIntentKey in :plugins:main
1111
* - OverviewIntentKey in :plugins:main
12-
* - RileyLinkIntentPreferenceKey in :pump:rileylink
1312
*
1413
* This enum is kept for backwards compatibility but should remain empty.
1514
* New intent keys should be added to their respective module key enums.

core/ui/src/main/kotlin/app/aaps/core/ui/compose/pump/PumpOverviewScreen.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package app.aaps.core.ui.compose.pump
33
import androidx.compose.animation.AnimatedVisibility
44
import androidx.compose.foundation.layout.Arrangement
55
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.PaddingValues
67
import androidx.compose.foundation.layout.Row
78
import androidx.compose.foundation.layout.Spacer
89
import androidx.compose.foundation.layout.fillMaxSize
@@ -86,11 +87,11 @@ private fun CommunicationStatusCard(banner: StatusBanner?, queueStatus: String?)
8687
if (banner == null && queueStatus == null) return
8788

8889
val (bgColor, fgColor) = when (banner?.level) {
89-
StatusLevel.CRITICAL -> MaterialTheme.colorScheme.errorContainer to MaterialTheme.colorScheme.onErrorContainer
90-
StatusLevel.WARNING -> MaterialTheme.colorScheme.tertiaryContainer to MaterialTheme.colorScheme.onTertiaryContainer
91-
StatusLevel.NORMAL -> MaterialTheme.colorScheme.primaryContainer to MaterialTheme.colorScheme.onPrimaryContainer
90+
StatusLevel.CRITICAL -> MaterialTheme.colorScheme.errorContainer to MaterialTheme.colorScheme.onErrorContainer
91+
StatusLevel.WARNING -> MaterialTheme.colorScheme.tertiaryContainer to MaterialTheme.colorScheme.onTertiaryContainer
92+
StatusLevel.NORMAL -> MaterialTheme.colorScheme.primaryContainer to MaterialTheme.colorScheme.onPrimaryContainer
9293
StatusLevel.UNSPECIFIED,
93-
null -> MaterialTheme.colorScheme.surfaceContainerHigh to MaterialTheme.colorScheme.onSurface
94+
null -> MaterialTheme.colorScheme.surfaceContainerHigh to MaterialTheme.colorScheme.onSurface
9495
}
9596

9697
Surface(
@@ -181,7 +182,8 @@ private fun ActionButtons(actions: List<PumpAction>) {
181182
FilledTonalButton(
182183
onClick = action.onClick,
183184
enabled = action.enabled,
184-
modifier = Modifier.weight(1f)
185+
modifier = Modifier.weight(1f),
186+
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp)
185187
) {
186188
if (action.icon != null) {
187189
Icon(
@@ -197,8 +199,8 @@ private fun ActionButtons(actions: List<PumpAction>) {
197199
modifier = Modifier.size(18.dp)
198200
)
199201
}
200-
Spacer(modifier = Modifier.size(8.dp))
201-
Text(text = action.label)
202+
Spacer(modifier = Modifier.size(4.dp))
203+
Text(text = action.label, maxLines = 1)
202204
}
203205
}
204206
if (row.size == 1) {

pump/medtronic/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ dependencies {
2222
implementation(project(":pump:common"))
2323
implementation(project(":pump:rileylink"))
2424

25+
implementation(libs.androidx.hilt.navigation.compose)
26+
2527
testImplementation(project(":core:keys"))
2628
testImplementation(project(":shared:tests"))
2729

pump/medtronic/src/main/AndroidManifest.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
android:enabled="true"
77
android:exported="false" />
88

9-
<activity
10-
android:name=".dialog.MedtronicHistoryActivity"
11-
android:exported="false"
12-
android:theme="@style/AppTheme" />
13-
149
<uses-library
1510
android:name="org.apache.http.legacy"
1611
android:required="false" />

0 commit comments

Comments
 (0)