FileDisplayActivity: wait until OCFileListFragment is initialized to trigger browseToRoot()

This solves a bug which caused a "Directory does not exist" popup when coming back from Gallery,
as it tried to call browseToRoot on GalleryFragment due it being executed before the fragment transaction.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-05-02 11:02:46 +02:00
parent 2bb8c91965
commit 9a2cbcbba4
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -513,6 +513,7 @@ public class FileDisplayActivity extends FileActivity
Log_OC.d(this, "Switch to oc file fragment");
setLeftFragment(new OCFileListFragment());
getSupportFragmentManager().executePendingTransactions();
browseToRoot();
}
}