mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
single NetworkLibraryActivity instance is now used
This commit is contained in:
parent
364e191be1
commit
469525664d
9 changed files with 50 additions and 36 deletions
|
@ -242,10 +242,14 @@ abstract class Util implements UserRegistrationConstants {
|
|||
static void openTree(Context context, NetworkTree tree) {
|
||||
final Class<?> clz = tree instanceof NetworkBookTree
|
||||
? NetworkBookInfoActivity.class : NetworkLibraryActivity.class;
|
||||
context.startActivity(
|
||||
new Intent(context.getApplicationContext(), clz)
|
||||
.putExtra(NetworkLibraryActivity.TREE_KEY_KEY, tree.getUniqueKey())
|
||||
);
|
||||
if (context instanceof NetworkLibraryActivity && clz == NetworkLibraryActivity.class) {
|
||||
((NetworkLibraryActivity)context).openTree(tree);
|
||||
} else {
|
||||
context.startActivity(
|
||||
new Intent(context.getApplicationContext(), clz)
|
||||
.putExtra(NetworkLibraryActivity.TREE_KEY_KEY, tree.getUniqueKey())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static NetworkTree getTreeFromIntent(Intent intent) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue