Skip to content

Commit f2a9cfb

Browse files
committed
* Fix regression on dav settings because CircularProgressIndicator is broken on compose 1.6.0 JetBrains/compose-multiplatform#4157
* Update AGP to 8.2.2
1 parent 6f0cc45 commit f2a9cfb

File tree

9 files changed

+78
-74
lines changed

9 files changed

+78
-74
lines changed

.idea/deploymentTargetDropDown.xml

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

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

.idea/migrations.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ dependencies {
8080
implementation 'androidx.activity:activity-ktx:1.8.2'
8181
implementation 'androidx.fragment:fragment-ktx:1.6.2'
8282
implementation platform('androidx.compose:compose-bom:2022.10.00')
83-
implementation 'androidx.compose.ui:ui'
84-
implementation 'androidx.compose.ui:ui-graphics'
85-
implementation 'androidx.compose.ui:ui-tooling-preview'
86-
implementation 'androidx.compose.material3:material3'
87-
implementation 'androidx.compose.material:material-icons-extended:1.6.0'
88-
implementation 'androidx.compose.runtime:runtime-livedata:1.6.0'
83+
implementation 'androidx.compose.ui:ui:1.5.4' // CircularProgressIndicator is broken on 1.6.0 https://github.com/JetBrains/compose-multiplatform/issues/4157
84+
implementation 'androidx.compose.ui:ui-graphics:1.5.4'
85+
implementation 'androidx.compose.ui:ui-tooling-preview:1.5.4'
86+
implementation 'androidx.compose.material3:material3:1.1.2'
87+
implementation 'androidx.compose.material:material-icons-extended:1.5.4'
88+
implementation 'androidx.compose.runtime:runtime-livedata:1.5.4'
8989
implementation 'androidx.datastore:datastore-preferences:1.0.0'
9090
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
9191
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'

app/src/main/java/com/phpbg/easysync/ui/DavSettingsActivity.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,12 @@ private fun PreferencesPreview() {
206206
MyApplicationTheme {
207207
Preferences(uiState = DavSettingsUiState(), stateChangeHandler = { }, saveHandler = { })
208208
}
209+
}
210+
211+
@Preview(name = "Light Mode", showBackground = true)
212+
@Composable
213+
private fun PreferencesPreviewWithCircularIndicator() {
214+
MyApplicationTheme {
215+
Preferences(uiState = DavSettingsUiState(ongoingIO = true), stateChangeHandler = { }, saveHandler = { })
216+
}
209217
}

app/src/main/java/com/phpbg/easysync/ui/MainActivity.kt

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import androidx.compose.foundation.layout.padding
4545
import androidx.compose.foundation.rememberScrollState
4646
import androidx.compose.foundation.verticalScroll
4747
import androidx.compose.material.icons.Icons
48-
import androidx.compose.material.icons.automirrored.filled.Help
48+
import androidx.compose.material.icons.filled.Help
4949
import androidx.compose.material.icons.filled.Cancel
5050
import androidx.compose.material.icons.filled.CheckCircle
5151
import androidx.compose.material.icons.filled.Info
@@ -248,7 +248,7 @@ private fun Main(
248248
title = null,
249249
actionTitle = stringResource(R.string.about),
250250
statusColor = Color.Gray,
251-
statusIcon = Icons.AutoMirrored.Filled.Help,
251+
statusIcon = Icons.Default.Help,
252252
clickHandler = {
253253
val i = Intent(Intent.ACTION_VIEW)
254254
i.data = Uri.parse("https://github.com/phpbg/easysync#easysync")
@@ -257,17 +257,32 @@ private fun Main(
257257
)
258258

259259
if (isTrial.value) {
260-
val msg = if (trialRemainingDays.intValue == 0) stringResource(R.string.home_trial_over) else pluralStringResource(R.plurals.home_trial_days_left, trialRemainingDays.intValue, trialRemainingDays.intValue)
260+
val msg =
261+
if (trialRemainingDays.intValue == 0) stringResource(R.string.home_trial_over) else pluralStringResource(
262+
R.plurals.home_trial_days_left,
263+
trialRemainingDays.intValue,
264+
trialRemainingDays.intValue
265+
)
261266
StatusTitleClickable(
262267
title = null,
263268
actionTitle = msg,
264269
statusColor = Color.Gray,
265270
statusIcon = Icons.Default.Info,
266271
clickHandler = {
267272
try {
268-
mContext.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.phpbg.easysync")))
273+
mContext.startActivity(
274+
Intent(
275+
Intent.ACTION_VIEW,
276+
Uri.parse("market://details?id=com.phpbg.easysync")
277+
)
278+
)
269279
} catch (e: ActivityNotFoundException) {
270-
mContext.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.phpbg.easysync")))
280+
mContext.startActivity(
281+
Intent(
282+
Intent.ACTION_VIEW,
283+
Uri.parse("https://play.google.com/store/apps/details?id=com.phpbg.easysync")
284+
)
285+
)
271286
}
272287
},
273288
)
@@ -283,7 +298,8 @@ private fun Main(
283298
-1
284299
}
285300
val maxJobs = max(localCount, syncedCount) + 1
286-
val jobCountPercent = if (jobCount == -1) -1 else round(100.0 * (maxJobs - jobCount) / maxJobs).toInt()
301+
val jobCountPercent =
302+
if (jobCount == -1) -1 else round(100.0 * (maxJobs - jobCount) / maxJobs).toInt()
287303
Row(
288304
modifier = Modifier
289305
.fillMaxWidth()
@@ -346,11 +362,17 @@ private fun Main(
346362
) {
347363
Button(onClick = {
348364
scope.launch {
349-
snackbarHostState.showSnackbar(message = "Sync requested", duration = SnackbarDuration.Short)
365+
snackbarHostState.showSnackbar(
366+
message = "Sync requested",
367+
duration = SnackbarDuration.Short
368+
)
350369
}
351370
fullSyncNowHandler()
352371
}, enabled = syncEnabled) {
353-
Text(text = stringResource(R.string.home_action_sync_now), style = MaterialTheme.typography.labelLarge)
372+
Text(
373+
text = stringResource(R.string.home_action_sync_now),
374+
style = MaterialTheme.typography.labelLarge
375+
)
354376
}
355377
}
356378
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ buildscript {
55
}
66
}
77
plugins {
8-
id 'com.android.application' version '8.1.1' apply false
9-
id 'com.android.library' version '8.1.1' apply false
8+
id 'com.android.application' version '8.2.2' apply false
9+
id 'com.android.library' version '8.2.2' apply false
1010
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
1111
id 'com.google.devtools.ksp' version '1.9.10-1.0.13' apply false
1212
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#Mon May 29 21:37:06 CEST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
77

88
# https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:verification
9-
distributionSha256Sum=4159b938ec734a8388ce03f52aa8f3c7ed0d31f5438622545de4f83a89b79788
9+
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3

0 commit comments

Comments
 (0)