From 44d4a132c193907ee53de180ad28e697828009e3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 11:19:32 +0200 Subject: Fix lifecycle, focus loss, crossfade and tab race review findings - MainActivity: remove rotate callbacks in onDestroy, ignore connect results once destroyed, rotate the background only while resumed, guard the fade end action. - HomeRows: each row owns one TileAdapter over a mutable list; rebinds refill it and notifyDataSetChanged instead of setAdapter, so focus and scroll survive a sample arriving (change payload keeps the holder). - Crossfade: flip front only on onResourceReady, cancel the animation before resetting alpha. - Tab loads ignore errors from a tab that is no longer shown; Home does not fire a second /folders request while one is in flight. - Load the instance logo after login in connect(). - FolderActivity: request grid focus after layout. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/mygram/droid/FolderActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/mygram/droid/FolderActivity.java') diff --git a/app/src/main/java/mygram/droid/FolderActivity.java b/app/src/main/java/mygram/droid/FolderActivity.java index 8da2533..10a9940 100644 --- a/app/src/main/java/mygram/droid/FolderActivity.java +++ b/app/src/main/java/mygram/droid/FolderActivity.java @@ -53,7 +53,7 @@ public final class FolderActivity extends Activity { Collections.shuffle(posts); grid = Ui.grid(this, Ui.postTiles(this, posts), Ui.POST_W, Ui.POST_H, 6); show(grid); - grid.requestFocus(); + grid.post(grid::requestFocus); // after layout }, e -> show(Ui.text(this, "Cannot load folder: " + e.getMessage(), 18))); } -- cgit v1.2.3