From f6706d04bd347465f9db1e484007db215100d965 Mon Sep 17 00:00:00 2001 From: Lena Date: Sun, 23 Aug 2026 00:00:00 +0000 Subject: app: apply the schedule when folders change Scheduler.apply cancels the periodic job while no folder points at a pinned remote and enqueues it once one does, so adding the first folder or removing the last one changes what should be scheduled. The remote and schedule editors already re-applied on save; this one did not, and a user who left the app from this screen kept a job that could only fire and refuse. --- app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt b/app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt index 47961c1..3024a52 100644 --- a/app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt +++ b/app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt @@ -168,6 +168,9 @@ class FolderEditActivity : AppCompatActivity() { return false } Config.save(this, next) + // The first folder arms the periodic job and the last one disarms it, + // so re-apply here rather than waiting for the dashboard to be resumed. + Scheduler.apply(this) return true } @@ -177,6 +180,7 @@ class FolderEditActivity : AppCompatActivity() { if (index in list.indices) { list.removeAt(index) Config.save(this, cfg.copy(folders = list)) + Scheduler.apply(this) } } } -- cgit v1.2.3