Browse Source

- revert some stuff closer to master branch

- adjust some comments
- removed RemoteRssFragment.getRssActivity()
pull/526/head
Twig N 5 years ago
parent
commit
b6dea1cf58
  1. 7
      app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java
  2. 12
      app/src/main/java/org/transdroid/core/gui/rss/RssfeedsActivity.java

7
app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java

@ -76,10 +76,6 @@ public class RemoteRssFragment extends Fragment { @@ -76,10 +76,6 @@ public class RemoteRssFragment extends Fragment {
torrentsList.setFastScrollEnabled(true);
}
protected RssfeedsActivity getRssActivity() {
return (RssfeedsActivity) getActivity();
}
@Override
public void onResume() {
super.onResume();
@ -88,7 +84,8 @@ public class RemoteRssFragment extends Fragment { @@ -88,7 +84,8 @@ public class RemoteRssFragment extends Fragment {
@OptionsItem(R.id.action_refresh)
protected void refreshScreen() {
getRssActivity().refreshRemoteFeeds();
RssfeedsActivity rssActivity = (RssfeedsActivity) getActivity();
rssActivity.refreshRemoteFeeds();
}
@OptionsItem(R.id.action_settings)

12
app/src/main/java/org/transdroid/core/gui/rss/RssfeedsActivity.java

@ -87,12 +87,12 @@ public class RssfeedsActivity extends AppCompatActivity { @@ -87,12 +87,12 @@ public class RssfeedsActivity extends AppCompatActivity {
protected static final int RSS_FEEDS_LOCAL = 0;
protected static final int RSS_FEEDS_REMOTE = 1;
@FragmentById(R.id.remoterss_fragment)
protected RemoteRssFragment fragmentRemoteFeeds;
@FragmentById(R.id.rssitems_fragment)
protected RssitemsFragment fragmentItems;
@FragmentById(R.id.rssfeeds_fragment)
protected RssfeedsFragment fragmentLocalFeeds;
@FragmentById(R.id.rssitems_fragment)
protected RssitemsFragment fragmentItems;
@FragmentById(R.id.remoterss_fragment)
protected RemoteRssFragment fragmentRemoteFeeds;
@ViewById
protected Toolbar rssfeedsToolbar;
@ -311,7 +311,7 @@ public class RssfeedsActivity extends AppCompatActivity { @@ -311,7 +311,7 @@ public class RssfeedsActivity extends AppCompatActivity {
return lastUsed.createServerAdapter(connectivityHelper.getConnectedNetworkName(), this);
}
// @Background
// @Background
public void refreshRemoteFeeds() {
// Connect to the last used server
IDaemonAdapter currentConnection = this.getCurrentConnection();
@ -350,7 +350,7 @@ public class RssfeedsActivity extends AppCompatActivity { @@ -350,7 +350,7 @@ public class RssfeedsActivity extends AppCompatActivity {
return;
}
// @UIThread
// @UIThread
fragmentRemoteFeeds.updateRemoteItems(
selectedFilter == 0 ? recentItems : feeds.get(selectedFilter -1).getItems(),
false /* allow android to restore scroll position */ );

Loading…
Cancel
Save