diff options
| author | Lena <lena@omega> | 2026-08-23 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-08-23 00:00:00 +0000 |
| commit | f6706d04bd347465f9db1e484007db215100d965 (patch) | |
| tree | e2a87be184f5c92751f0f15e38496cfe82ce7ba2 /app/src/main/java/invalid/lena | |
| parent | 27bce144aa808bad16435f35132bc08da2b05bf4 (diff) | |
| download | rsend-f6706d04bd347465f9db1e484007db215100d965.tar.gz | |
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.
Diffstat (limited to 'app/src/main/java/invalid/lena')
| -rw-r--r-- | app/src/main/java/invalid/lena/rsend/FolderEditActivity.kt | 4 |
1 files changed, 4 insertions, 0 deletions
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) } } } |