From 7b5fd5c8ad9ca5359a7a0bd2caf0aa65a23a0b07 Mon Sep 17 00:00:00 2001 From: Luis Guzman Date: Fri, 31 Jul 2026 05:08:09 -0600 Subject: [PATCH] =?UTF-8?q?ADFA-4957:=20clone=20RECEIVE=20return-to-op=20?= =?UTF-8?q?=E2=80=94=20reopen=20lands=20on=20the=20Clone=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A live clone receive is already app-scoped in SyncProgressRepository (CloneFragment observes it and re-binds to the transfer). On a plain reopen (launcher -> SplashActivity -> LibraryActivity, no explicit EXTRA_TAB) with a receive active, land on the Clone tab so the user returns to the in-progress transfer instead of Home. Only receive: the send daemon state is still Fragment-scoped, so routing a send would show the fork, not the share — full send-session app-scoping + a clone-specific notification are a follow-up. --- .../java/org/iiab/controller/redesign/LibraryActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java index b11646eae..c3fe37eac 100644 --- a/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java +++ b/controller/app/src/main/java/org/iiab/controller/redesign/LibraryActivity.java @@ -100,6 +100,13 @@ protected void onCreate(Bundle savedInstanceState) { currentTab = (savedInstanceState != null) ? savedInstanceState.getInt(STATE_TAB, R.id.nav_library) : getIntent().getIntExtra(EXTRA_TAB, R.id.nav_library); // ADFA-4777 + // ADFA-4957: a live clone RECEIVE is app-scoped in SyncProgressRepository (unlike the send + // daemon, still Fragment-scoped). On a plain reopen (no explicit tab requested) land on the + // Clone tab so CloneFragment re-binds to the in-progress transfer instead of showing Home. + if (savedInstanceState == null && !getIntent().hasExtra(EXTRA_TAB) + && org.iiab.controller.sync.presentation.SyncProgressRepository.get().isActive()) { + currentTab = R.id.nav_clone; + } showTab(currentTab); syncSelection(currentTab);