@ -90,9 +97,11 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -90,9 +97,11 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
privateServerSettingcurrentServerSettings=null;
// Views
@ViewById(resName="details_container")
@ViewById
protectedViewdetailsContainer;
@ViewById(resName="details_list")
@ViewById
protectedSwipeRefreshLayoutswipeRefreshLayout;
@ViewById
protectedListViewdetailsList;
@ViewById
protectedTextViewemptyText,errorText;
@ -118,16 +127,19 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -118,16 +127,19 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
// Restore the fragment state (on orientation changes et al.)
if(torrent!=null)
if(torrent!=null){
updateTorrent(torrent);
if(torrentDetails!=null)
}
if(torrentDetails!=null){
updateTorrentDetails(torrent,torrentDetails);
if(torrentFiles!=null)
}
if(torrentFiles!=null){
updateTorrentFiles(torrent,torrentFiles);
}
}
@ -165,13 +177,14 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -165,13 +177,14 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -181,22 +194,23 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -181,22 +194,23 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
// Only try to update if we actually were showing a torrent
if(this.torrentId==null||torrents==null)
if(this.torrentId==null||torrents==null){
return;
}
for(TorrentnewTorrent:torrents){
if(newTorrent.getUniqueID().equals(torrentId)){
// Found, so we can update our data as well
@ -207,12 +221,12 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -207,12 +221,12 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -238,8 +252,10 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -238,8 +252,10 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -287,59 +303,59 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -287,59 +303,59 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -349,7 +365,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -349,7 +365,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -357,22 +373,25 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -357,22 +373,25 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -413,11 +432,9 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -413,11 +432,9 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -430,35 +447,36 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -430,35 +447,36 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -472,8 +490,9 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -472,8 +490,9 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
// If the file is directly in the root, AndFTP fails if we supply the proper path (like
// /file.pdf)
// Work around this bug by removing the leading / if no further directories are used in the path
if(file.startsWith("/")&&file.indexOf("/",1)<0)
if(file.startsWith("/")&&file.indexOf("/",1)<0){
file=file.substring(1);
}
andftpStart.putExtra("remote_file"+(f+1),file);
}
}
@ -485,8 +504,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -485,8 +504,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
// Try using a VIEW intent given an ftp:// scheme URI
@ -494,8 +512,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -494,8 +512,7 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
}
// No app is available that can handle FTP downloads
@ -503,24 +520,27 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@@ -503,24 +520,27 @@ public class DetailsFragment extends Fragment implements OnTrackersUpdatedListen
@ -91,7 +92,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -91,7 +92,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
protectedDaemondaemonType;
// Views
@ViewById(resName="torrents_list")
@ViewById
protectedSwipeRefreshLayoutswipeRefreshLayout;
@ViewById
protectedListViewtorrentsList;
@ViewById
protectedTextViewemptyText;
@ -113,11 +116,12 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -113,11 +116,12 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -149,8 +153,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -149,8 +153,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
}
}
// In case it was an update, add the updated torrent object
if(!wasRemoved)
if(!wasRemoved){
this.torrents.add(affected);
}
// Now refresh the screen
applyAllFilters();
}
@ -162,8 +167,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -162,8 +167,9 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -172,8 +178,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -172,8 +178,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -212,26 +218,26 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -212,26 +218,26 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
}
// Filter the list of torrents to show according to navigation and text filters
@ -270,11 +276,11 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -270,11 +276,11 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -316,9 +322,10 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -316,9 +322,10 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -359,7 +366,7 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -359,7 +366,7 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -373,8 +380,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -373,8 +380,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -393,12 +400,12 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -393,12 +400,12 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
clear(true,false);// Indirectly also calls updateViewVisibility()
}else{
@ -407,10 +414,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@@ -407,10 +414,8 @@ public class TorrentsFragment extends Fragment implements OnLabelPickedListener
@ -73,36 +73,31 @@ public class TorrentDetailsView extends RelativeLayout {
@@ -73,36 +73,31 @@ public class TorrentDetailsView extends RelativeLayout {
@ -43,5 +44,5 @@ public class TorrentFileView extends TorrentFilePriorityLayout {
@@ -43,5 +44,5 @@ public class TorrentFileView extends TorrentFilePriorityLayout {
@ -127,8 +130,7 @@ public class RssfeedsActivity extends ActionBarActivity {
@@ -127,8 +130,7 @@ public class RssfeedsActivity extends ActionBarActivity {
@ -140,12 +142,10 @@ public class RssfeedsActivity extends ActionBarActivity {
@@ -140,12 +142,10 @@ public class RssfeedsActivity extends ActionBarActivity {
@ -156,8 +156,9 @@ public class RssfeedsActivity extends ActionBarActivity {
@@ -156,8 +156,9 @@ public class RssfeedsActivity extends ActionBarActivity {
// be loaded until the RSS feeds screen in opened again.
@ -178,14 +179,16 @@ public class RssfeedsActivity extends ActionBarActivity {
@@ -178,14 +179,16 @@ public class RssfeedsActivity extends ActionBarActivity {
// be loaded until the RSS feeds screen in opened again