mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
better catalog list processing
This commit is contained in:
parent
52173ee211
commit
53ec85193b
4 changed files with 5 additions and 3 deletions
|
@ -95,6 +95,7 @@ public abstract class NetworkLibraryActivity extends TreeActivity<NetworkTree> i
|
|||
Util.initLibrary(NetworkLibraryActivity.this, myNetworkContext, new Runnable() {
|
||||
public void run() {
|
||||
NetworkLibrary.Instance().runBackgroundUpdate(false);
|
||||
Util.requestCatalogPlugins(NetworkLibraryActivity.this);
|
||||
if (intent != null) {
|
||||
openTreeByIntent(intent);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,5 @@ public class NetworkLibraryPrimaryActivity extends NetworkLibraryActivity {
|
|||
super.onCreate(icicle);
|
||||
|
||||
myNetworkContext.reloadCookie();
|
||||
|
||||
Util.requestCatalogPlugins(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ public abstract class Util implements UserRegistrationConstants {
|
|||
}
|
||||
};
|
||||
|
||||
static void requestCatalogPlugins(Activity activity) {
|
||||
public static void requestCatalogPlugins(Activity activity) {
|
||||
activity.sendOrderedBroadcast(
|
||||
new Intent(EXTRA_CATALOG_ACTION),
|
||||
null,
|
||||
|
|
|
@ -26,6 +26,8 @@ import org.geometerplus.fbreader.network.NetworkLibrary;
|
|||
|
||||
import org.geometerplus.zlibrary.ui.android.R;
|
||||
|
||||
import org.geometerplus.android.fbreader.network.Util;
|
||||
|
||||
public class RefreshRootCatalogAction extends RootAction {
|
||||
public RefreshRootCatalogAction(Activity activity) {
|
||||
super(activity, ActionCode.REFRESH, "refreshCatalogsList", R.drawable.ic_menu_refresh);
|
||||
|
@ -39,5 +41,6 @@ public class RefreshRootCatalogAction extends RootAction {
|
|||
@Override
|
||||
public void run(NetworkTree tree) {
|
||||
NetworkLibrary.Instance().runBackgroundUpdate(true);
|
||||
Util.requestCatalogPlugins(myActivity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue