decrease OFFLINE_SYNC_SEQ because of API limits
This commit is contained in:
parent
d3320e66ec
commit
460fa4923d
@ -7,8 +7,6 @@ import org.fox.ttrss.types.ArticleList;
|
|||||||
import org.fox.ttrss.types.Feed;
|
import org.fox.ttrss.types.Feed;
|
||||||
import org.fox.ttrss.util.HeadlinesRequest;
|
import org.fox.ttrss.util.HeadlinesRequest;
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
@ -20,6 +18,8 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
|
||||||
public class ArticlePager extends Fragment {
|
public class ArticlePager extends Fragment {
|
||||||
|
|
||||||
private final String TAG = "ArticlePager";
|
private final String TAG = "ArticlePager";
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.fox.ttrss.types.Article;
|
import org.fox.ttrss.types.Article;
|
||||||
import org.fox.ttrss.types.ArticleList;
|
import org.fox.ttrss.types.ArticleList;
|
||||||
import org.fox.ttrss.types.Feed;
|
import org.fox.ttrss.types.Feed;
|
||||||
@ -13,8 +11,6 @@ import android.preference.PreferenceManager;
|
|||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
@ -12,25 +12,19 @@ import org.fox.ttrss.types.ArticleList;
|
|||||||
import org.fox.ttrss.types.Feed;
|
import org.fox.ttrss.types.Feed;
|
||||||
import org.fox.ttrss.types.Label;
|
import org.fox.ttrss.types.Label;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface.OnMultiChoiceClickListener;
|
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.ActionMode;
|
import android.view.ActionMode;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -42,6 +36,11 @@ import android.widget.EditText;
|
|||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.ShareActionProvider;
|
import android.widget.ShareActionProvider;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
public class OnlineActivity extends CommonActivity {
|
public class OnlineActivity extends CommonActivity {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package org.fox.ttrss.offline;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.fox.ttrss.OnlineActivity;
|
|
||||||
import org.fox.ttrss.R;
|
import org.fox.ttrss.R;
|
||||||
import org.fox.ttrss.util.ImageCacheService;
|
import org.fox.ttrss.util.ImageCacheService;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
@ -29,10 +28,10 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
|
||||||
import android.webkit.WebSettings.LayoutAlgorithm;
|
import android.webkit.WebSettings.LayoutAlgorithm;
|
||||||
import android.widget.TextView;
|
import android.webkit.WebView;
|
||||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
public class OfflineArticleFragment extends Fragment {
|
public class OfflineArticleFragment extends Fragment {
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
@ -4,7 +4,6 @@ import org.fox.ttrss.R;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteStatement;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.BaseColumns;
|
import android.provider.BaseColumns;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
@ -46,8 +46,8 @@ public class OfflineDownloadService extends Service {
|
|||||||
public static final String INTENT_ACTION_SUCCESS = "org.fox.ttrss.intent.action.DownloadComplete";
|
public static final String INTENT_ACTION_SUCCESS = "org.fox.ttrss.intent.action.DownloadComplete";
|
||||||
public static final String INTENT_ACTION_CANCEL = "org.fox.ttrss.intent.action.Cancel";
|
public static final String INTENT_ACTION_CANCEL = "org.fox.ttrss.intent.action.Cancel";
|
||||||
|
|
||||||
private static final int OFFLINE_SYNC_SEQ = 100;
|
private static final int OFFLINE_SYNC_SEQ = 50;
|
||||||
private static final int OFFLINE_SYNC_MAX = 500;
|
private static final int OFFLINE_SYNC_MAX = OFFLINE_SYNC_SEQ * 10;
|
||||||
|
|
||||||
private SQLiteDatabase m_writableDb;
|
private SQLiteDatabase m_writableDb;
|
||||||
private SQLiteDatabase m_readableDb;
|
private SQLiteDatabase m_readableDb;
|
||||||
|
@ -100,15 +100,6 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline
|
|||||||
if (open) {
|
if (open) {
|
||||||
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
OfflineHeadlinesFragment hf = (OfflineHeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
/* OfflineArticlePager af = new OfflineArticlePager(articleId, hf.getFeedId(), hf.getFeedIsCat());
|
|
||||||
af.setSearchQuery(hf.getSearchQuery());
|
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
||||||
|
|
||||||
ft.replace(R.id.article_fragment, af, FRAG_ARTICLE);
|
|
||||||
|
|
||||||
ft.commit(); */
|
|
||||||
|
|
||||||
OfflineArticlePager af = (OfflineArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
OfflineArticlePager af = (OfflineArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||||
|
|
||||||
af.setArticleId(articleId);
|
af.setArticleId(articleId);
|
||||||
@ -140,6 +131,8 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline
|
|||||||
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||||
|
|
||||||
m_menu.setGroupVisible(R.id.menu_group_article, af != null);
|
m_menu.setGroupVisible(R.id.menu_group_article, af != null);
|
||||||
|
|
||||||
|
m_menu.findItem(R.id.search).setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.fox.ttrss.offline;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
|
||||||
|
|
||||||
public interface OfflineHeadlinesEventListener {
|
public interface OfflineHeadlinesEventListener {
|
||||||
void onArticleSelected(int articleId, boolean open);
|
void onArticleSelected(int articleId, boolean open);
|
||||||
|
@ -7,8 +7,6 @@ import java.util.TimeZone;
|
|||||||
|
|
||||||
import org.fox.ttrss.GlobalState;
|
import org.fox.ttrss.GlobalState;
|
||||||
import org.fox.ttrss.R;
|
import org.fox.ttrss.R;
|
||||||
import org.fox.ttrss.types.Article;
|
|
||||||
import org.fox.ttrss.types.ArticleList;
|
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
Loading…
Reference in New Issue
Block a user