From 49a275c53ed27922dd78cb86ba264e24bcb89175 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 10 Sep 2026 01:30:25 +0200 Subject: [PATCH] Fix sync of archived --- .../net/helcel/cowspent/android/main/BillsListViewActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/helcel/cowspent/android/main/BillsListViewActivity.kt b/app/src/main/java/net/helcel/cowspent/android/main/BillsListViewActivity.kt index dcff779..0dbefee 100644 --- a/app/src/main/java/net/helcel/cowspent/android/main/BillsListViewActivity.kt +++ b/app/src/main/java/net/helcel/cowspent/android/main/BillsListViewActivity.kt @@ -807,7 +807,7 @@ class BillsListViewActivity : lifecycleScope.launch { val remoteProjects = withContext(Dispatchers.IO) { db.projects } - .filter { !it.isLocal && !it.isArchived } + .filter { !it.isLocal } // Only the first one scheduled actually starts - the rest queue behind it - and it // takes the screen's callback with it. So the selected project goes first: otherwise // the spinner follows a project the user is not looking at, stops when that one @@ -829,7 +829,7 @@ class BillsListViewActivity : preferences.edit { putLong(getString(R.string.pref_key_last_account_sync_timestamp), now) } - remoteProjects.count { + remoteProjects.filter { !it.isArchived }.count { val full = neverSynced(it) val scheduled = db.cowspentServerSyncHelper.scheduleSync(false, it, full) != null if (scheduled) {