From c14fd31f24d506e2e68172781db6a3f5641fabae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 18:20:12 +0200 Subject: [PATCH 1/7] Bump com.google.devtools.ksp from 1.9.23-1.0.19 to 1.9.23-1.0.20 (#275) Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from 1.9.23-1.0.19 to 1.9.23-1.0.20. - [Release notes](https://github.com/google/ksp/releases) - [Commits](https://github.com/google/ksp/compare/1.9.23-1.0.19...1.9.23-1.0.20) --- updated-dependencies: - dependency-name: com.google.devtools.ksp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fc964743..806283ed 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -27,7 +27,7 @@ joda-time = "2.12.7" junit = "4.13.2" kotlin = "1.9.23" kotlinx-coroutines = "1.8.0" -ksp = "1.9.23-1.0.19" +ksp = "1.9.23-1.0.20" okhttp = "4.12.0" room = "2.6.1" From 38b6f3c1d3005777a5ad35d1dcf58b6049fc0145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:35:07 +0200 Subject: [PATCH 2/7] Bump androidx.compose.runtime:runtime-livedata from 1.6.4 to 1.6.5 (#273) Bumps androidx.compose.runtime:runtime-livedata from 1.6.4 to 1.6.5. --- updated-dependencies: - dependency-name: androidx.compose.runtime:runtime-livedata dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 806283ed..6c1713b3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ compose-compiler = "1.5.11" compose-dialogs = "1.3.0" compose-material = "1.6.4" compose-material3 = "1.2.1" -compose-runtime = "1.6.4" +compose-runtime = "1.6.5" compose-ui = "1.6.4" desugaring = "2.0.4" joda-time = "2.12.7" From 07c71b038fcb5c2e6aefc040462da93e9f938a68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:35:24 +0200 Subject: [PATCH 3/7] Bump androidx.compose.material:material-icons-extended (#272) Bumps androidx.compose.material:material-icons-extended from 1.6.4 to 1.6.5. --- updated-dependencies: - dependency-name: androidx.compose.material:material-icons-extended dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6c1713b3..48e210b0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ commons-lang3 = "3.8.1" # Keep in sync with Kotlin version: https://developer.android.com/jetpack/androidx/releases/compose-kotlin compose-compiler = "1.5.11" compose-dialogs = "1.3.0" -compose-material = "1.6.4" +compose-material = "1.6.5" compose-material3 = "1.2.1" compose-runtime = "1.6.5" compose-ui = "1.6.4" From 13cc55bc2df2946c672af193d0c4206356b2ca77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:19:08 +0200 Subject: [PATCH 4/7] Bump compose-ui from 1.6.4 to 1.6.5 (#271) Bumps `compose-ui` from 1.6.4 to 1.6.5. Updates `androidx.compose.ui:ui-tooling` from 1.6.4 to 1.6.5 Updates `androidx.compose.ui:ui-tooling-preview` from 1.6.4 to 1.6.5 --- updated-dependencies: - dependency-name: androidx.compose.ui:ui-tooling dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: androidx.compose.ui:ui-tooling-preview dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Arnau Mora --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 48e210b0..1ec06065 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,7 @@ compose-dialogs = "1.3.0" compose-material = "1.6.5" compose-material3 = "1.2.1" compose-runtime = "1.6.5" -compose-ui = "1.6.4" +compose-ui = "1.6.5" desugaring = "2.0.4" joda-time = "2.12.7" junit = "4.13.2" From 02f7662c1d5eb0be213881853076f7890a8ba5e0 Mon Sep 17 00:00:00 2001 From: Arnau Mora Date: Tue, 9 Apr 2024 10:53:14 +0200 Subject: [PATCH 5/7] Added error notifications (#268) Signed-off-by: Arnau Mora --- .../at/bitfire/icsdroid/ProcessEventsTask.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/src/main/java/at/bitfire/icsdroid/ProcessEventsTask.kt b/app/src/main/java/at/bitfire/icsdroid/ProcessEventsTask.kt index b9f0ee21..78b7ddeb 100644 --- a/app/src/main/java/at/bitfire/icsdroid/ProcessEventsTask.kt +++ b/app/src/main/java/at/bitfire/icsdroid/ProcessEventsTask.kt @@ -21,6 +21,7 @@ import at.bitfire.icsdroid.ui.views.EditCalendarActivity import java.io.InputStream import java.io.InputStreamReader import java.time.Duration +import at.bitfire.icsdroid.ui.views.CalendarListActivity import net.fortuna.ical4j.model.Property import net.fortuna.ical4j.model.PropertyList import net.fortuna.ical4j.model.component.VAlarm @@ -60,6 +61,7 @@ class ProcessEventsTask( } catch (e: Exception) { Log.e(Constants.TAG, "Couldn't sync calendar", e) subscriptionsDao.updateStatusError(subscription.id, e.localizedMessage ?: e.toString()) + notifyError(e) } Log.i(Constants.TAG, "iCalendar file completely processed") } @@ -262,4 +264,25 @@ class ProcessEventsTask( Log.i(Constants.TAG, "… $deleted events deleted") } + private fun notifyError(exception: Exception) { + val notificationManager = NotificationUtils.createChannels(context) + val notification = NotificationCompat.Builder(context, NotificationUtils.CHANNEL_SYNC) + .setSmallIcon(R.drawable.ic_sync_problem_white) + .setCategory(NotificationCompat.CATEGORY_ERROR) + .setGroup(context.getString(R.string.app_name)) + .setContentTitle(context.getString(R.string.sync_error_title)) + .setContentText(exception.localizedMessage ?: exception.message) + .setAutoCancel(true) + .setWhen(System.currentTimeMillis()) + .setOnlyAlertOnce(true) + .setContentIntent( + PendingIntent.getActivity( + context, + 0, + Intent(context, CalendarListActivity::class.java), + PendingIntent.FLAG_IMMUTABLE + ) + ) + notificationManager.notify(subscription.id.toInt(), notification.build()) + } } \ No newline at end of file From 4825d90123d54b8019e3c70f77034c2fbdf690c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:34:40 +0200 Subject: [PATCH 6/7] Bump aboutLibs from 11.1.1 to 11.1.2 (#276) Bumps `aboutLibs` from 11.1.1 to 11.1.2. Updates `com.mikepenz:aboutlibraries-compose` from 11.1.1 to 11.1.2 - [Release notes](https://github.com/mikepenz/AboutLibraries/releases) - [Commits](https://github.com/mikepenz/AboutLibraries/compare/v11.1.1...v11.1.2) Updates `com.mikepenz.aboutlibraries.plugin` from 11.1.1 to 11.1.2 --- updated-dependencies: - dependency-name: com.mikepenz:aboutlibraries-compose dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.mikepenz.aboutlibraries.plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1ec06065..15cf7e1f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -aboutLibs = "11.1.1" +aboutLibs = "11.1.2" agp = "8.3.1" androidx-activityCompose = "1.8.2" androidx-appCompat = "1.6.1" From 60ab4a079cc07d7027bc20b58bd2882cea59dc37 Mon Sep 17 00:00:00 2001 From: Sunik Kupfer Date: Wed, 10 Apr 2024 13:07:39 +0200 Subject: [PATCH 7/7] Show a linear progress indicator while sync is running (#277) --- .../bitfire/icsdroid/ui/views/CalendarListActivity.kt | 11 +++++++++++ .../bitfire/icsdroid/ui/views/EnterUrlComposable.kt | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/app/src/main/java/at/bitfire/icsdroid/ui/views/CalendarListActivity.kt b/app/src/main/java/at/bitfire/icsdroid/ui/views/CalendarListActivity.kt index 009ef36e..2996a452 100644 --- a/app/src/main/java/at/bitfire/icsdroid/ui/views/CalendarListActivity.kt +++ b/app/src/main/java/at/bitfire/icsdroid/ui/views/CalendarListActivity.kt @@ -15,6 +15,7 @@ import android.os.PowerManager import android.widget.Toast import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity +import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues @@ -34,6 +35,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text @@ -208,6 +210,15 @@ class CalendarListActivity: AppCompatActivity() { containerColor = MaterialTheme.colorScheme.primary, contentColor = MaterialTheme.colorScheme.onPrimary ) + + // progress indicator + AnimatedVisibility(syncing) { + LinearProgressIndicator( + color = MaterialTheme.colorScheme.secondary, + modifier = Modifier.fillMaxWidth() + ) + } + LazyColumn(Modifier.fillMaxSize()) { // Calendar permission card if (askForCalendarPermission) { diff --git a/app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt b/app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt index 1c7a06f7..41ec809c 100644 --- a/app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt +++ b/app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt @@ -22,6 +22,7 @@ import androidx.compose.material3.SnackbarHostState import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Warning import androidx.compose.material3.Icon +import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text @@ -86,6 +87,9 @@ fun EnterUrlComposable( Scaffold( snackbarHost = { SnackbarHost(snackbarHostState) } ) { paddingValues -> + AnimatedVisibility(isVerifyingUrl) { + LinearProgressIndicator(Modifier.fillMaxWidth()) + } Column( modifier = Modifier .fillMaxSize() @@ -93,6 +97,7 @@ fun EnterUrlComposable( .padding(horizontal = 16.dp) .verticalScroll(rememberScrollState()) ) { + // Instead of adding vertical padding to column, use spacer so that if content is // scrolled, it is not spaced Spacer(modifier = Modifier.height(16.dp))